Class MessageFactory

java.lang.Object
org.apache.el.util.MessageFactory

public final class MessageFactory extends Object
Factory for creating localized EL messages.
  • Constructor Details

    • MessageFactory

      public MessageFactory(ResourceBundle bundle)
      Constructor.
      Parameters:
      bundle - the resource bundle
  • Method Details

    • get

      public static String get(String key)
      Get a localized message.
      Parameters:
      key - the message key
      Returns:
      the message
    • get

      public static String get(String key, Object... args)
      Get a localized message with arguments.
      Parameters:
      key - the message key
      args - the arguments
      Returns:
      the message
    • getInternal

      protected String getInternal(String key)
      Get a message from the bundle.
      Parameters:
      key - the message key
      Returns:
      the message
    • getInternal

      protected String getInternal(String key, Object... args)
      Get a message from the bundle with arguments.
      Parameters:
      key - the message key
      args - the arguments
      Returns:
      the message