Class MessageSource

All Implemented Interfaces:

public class MessageSource extends GroovyObjectSupport
Message source backed up by one or more ResourceBundle instances for simple i18n support.
  • Constructor Details

    • MessageSource

      public MessageSource(String[] names)
    • MessageSource

      public MessageSource(String name)
    • MessageSource

      public MessageSource(Class[] types)
    • MessageSource

      public MessageSource(Class type)
  • Method Details

    • getMessage

      public String getMessage(String code)
      Get a raw message from the resource bundles using the given code.
    • format

      public String format(String code, Object[] args)
      Format a message (based on MessageFormat) using the message from the resource bundles using the given code as a pattern and the given objects as arguments.
    • getProperty

      public Object getProperty(String name)
      Description copied from interface: GroovyObject
      Retrieves a property value.
      name - the name of the property of interest
      the given property
      See Also: