[Java] Class MessageSource

  • org.codehaus.groovy.tools.shell.util.MessageSource

Message source backed up by one or more ResourceBundle instances for simple i18n support.

Authors:
Jason Dillon

Constructor Summary

Constructors
Constructor and description
MessageSource (String[] names)
MessageSource (String name)
MessageSource (Class[] types)
MessageSource (Class type)

Methods Summary

Methods
Type Params Return Type Name and description
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.
String getMessage(String code)
Get a raw message from the resource bundles using the given code.
Object getProperty(String name)
@see #getMessage(String)

Inherited Methods Summary

Inherited Methods
Methods inherited from class Name
class GroovyObjectSupport getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty
class Object wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

public MessageSource(String[] names)

public MessageSource(String name)

public MessageSource(Class[] types)

public MessageSource(Class type)

Method Detail

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.

public String getMessage(String code)

Get a raw message from the resource bundles using the given code.

public Object getProperty(String name)

See Also:
getMessage(String)

© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/tools/shell/util/MessageSource.html