Class MessageRetriever


  • @Deprecated
    public class MessageRetriever
    extends java.lang.Object
    Deprecated.
    Retrieve and format messages stored in a resource.

    This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

    Since:
    1.2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Configuration configuration
      Deprecated.
      The global configuration information for this run.
      private java.util.ResourceBundle messageRB
      Deprecated.
      The lazily fetched resource..
      private java.lang.String resourcelocation
      Deprecated.
      The location from which to lazily fetch the resource..
    • Constructor Summary

      Constructors 
      Constructor Description
      MessageRetriever​(Configuration configuration, java.lang.String resourcelocation)
      Deprecated.
      Initialize the ResourceBundle with the given resource.
      MessageRetriever​(java.util.ResourceBundle rb)
      Deprecated.
      Initialize the ResourceBundle with the given resource.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.String key)
      Deprecated.
      Determines whether the given key can be retrieved from this MessageRetriever
      void error​(SourcePosition pos, java.lang.String key, java.lang.Object... args)
      Deprecated.
      Print error message, increment error count.
      void error​(java.lang.String key, java.lang.Object... args)
      Deprecated.
      Print error message, increment error count.
      java.lang.String getText​(java.lang.String key, java.lang.Object... args)
      Deprecated.
      Get and format message string from resource
      private java.util.ResourceBundle initRB()
      Deprecated.
       
      void notice​(SourcePosition pos, java.lang.String key, java.lang.Object... args)
      Deprecated.
      Print a message.
      void notice​(java.lang.String key, java.lang.Object... args)
      Deprecated.
      Print a message.
      private void printError​(SourcePosition pos, java.lang.String msg)
      Deprecated.
      Print error message, increment error count.
      private void printError​(java.lang.String msg)
      Deprecated.
      Print error message, increment error count.
      private void printNotice​(SourcePosition pos, java.lang.String msg)
      Deprecated.
      Print a message.
      private void printNotice​(java.lang.String msg)
      Deprecated.
      Print a message.
      private void printWarning​(SourcePosition pos, java.lang.String msg)
      Deprecated.
      Print warning message, increment warning count.
      private void printWarning​(java.lang.String msg)
      Deprecated.
      Print warning message, increment warning count.
      void warning​(SourcePosition pos, java.lang.String key, java.lang.Object... args)
      Deprecated.
      Print warning message, increment warning count.
      void warning​(java.lang.String key, java.lang.Object... args)
      Deprecated.
      Print warning message, increment warning count.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • configuration

        private final Configuration configuration
        Deprecated.
        The global configuration information for this run.
      • resourcelocation

        private final java.lang.String resourcelocation
        Deprecated.
        The location from which to lazily fetch the resource..
      • messageRB

        private java.util.ResourceBundle messageRB
        Deprecated.
        The lazily fetched resource..
    • Constructor Detail

      • MessageRetriever

        public MessageRetriever​(java.util.ResourceBundle rb)
        Deprecated.
        Initialize the ResourceBundle with the given resource.
        Parameters:
        rb - the resource bundle to read.
      • MessageRetriever

        public MessageRetriever​(Configuration configuration,
                                java.lang.String resourcelocation)
        Deprecated.
        Initialize the ResourceBundle with the given resource.
        Parameters:
        configuration - the configuration
        resourcelocation - Resource.
    • Method Detail

      • initRB

        private java.util.ResourceBundle initRB()
        Deprecated.
      • containsKey

        public boolean containsKey​(java.lang.String key)
        Deprecated.
        Determines whether the given key can be retrieved from this MessageRetriever
        Parameters:
        key - the resource key
        Returns:
        true if the given key is contained in the underlying ResourceBundle.
      • getText

        public java.lang.String getText​(java.lang.String key,
                                        java.lang.Object... args)
                                 throws java.util.MissingResourceException
        Deprecated.
        Get and format message string from resource
        Parameters:
        key - selects message from resource
        args - arguments to be replaced in the message.
        Throws:
        java.util.MissingResourceException - when the key does not exist in the properties file.
      • printError

        private void printError​(SourcePosition pos,
                                java.lang.String msg)
        Deprecated.
        Print error message, increment error count.
        Parameters:
        pos - the position of the source
        msg - message to print
      • printError

        private void printError​(java.lang.String msg)
        Deprecated.
        Print error message, increment error count.
        Parameters:
        msg - message to print
      • printWarning

        private void printWarning​(SourcePosition pos,
                                  java.lang.String msg)
        Deprecated.
        Print warning message, increment warning count.
        Parameters:
        pos - the position of the source
        msg - message to print
      • printWarning

        private void printWarning​(java.lang.String msg)
        Deprecated.
        Print warning message, increment warning count.
        Parameters:
        msg - message to print
      • printNotice

        private void printNotice​(SourcePosition pos,
                                 java.lang.String msg)
        Deprecated.
        Print a message.
        Parameters:
        pos - the position of the source
        msg - message to print
      • printNotice

        private void printNotice​(java.lang.String msg)
        Deprecated.
        Print a message.
        Parameters:
        msg - message to print
      • error

        public void error​(SourcePosition pos,
                          java.lang.String key,
                          java.lang.Object... args)
        Deprecated.
        Print error message, increment error count.
        Parameters:
        pos - the position of the source
        key - selects message from resource
        args - arguments to be replaced in the message.
      • error

        public void error​(java.lang.String key,
                          java.lang.Object... args)
        Deprecated.
        Print error message, increment error count.
        Parameters:
        key - selects message from resource
        args - arguments to be replaced in the message.
      • warning

        public void warning​(SourcePosition pos,
                            java.lang.String key,
                            java.lang.Object... args)
        Deprecated.
        Print warning message, increment warning count.
        Parameters:
        pos - the position of the source
        key - selects message from resource
        args - arguments to be replaced in the message.
      • warning

        public void warning​(java.lang.String key,
                            java.lang.Object... args)
        Deprecated.
        Print warning message, increment warning count.
        Parameters:
        key - selects message from resource
        args - arguments to be replaced in the message.
      • notice

        public void notice​(SourcePosition pos,
                           java.lang.String key,
                           java.lang.Object... args)
        Deprecated.
        Print a message.
        Parameters:
        pos - the position of the source
        key - selects message from resource
        args - arguments to be replaced in the message.
      • notice

        public void notice​(java.lang.String key,
                           java.lang.Object... args)
        Deprecated.
        Print a message.
        Parameters:
        key - selects message from resource
        args - arguments to be replaced in the message.