Class MessageSource
- java.lang.Object
- 
- groovy.lang.GroovyObjectSupport
- 
- org.codehaus.groovy.tools.shell.util.MessageSource
 
 
- 
- All Implemented Interfaces:
- GroovyObject
 
 public class MessageSource extends GroovyObjectSupport Message source backed up by one or moreResourceBundleinstances for simple i18n support.
- 
- 
Constructor SummaryConstructors Constructor Description MessageSource(Class type)MessageSource(Class[] types)MessageSource(String name)MessageSource(String[] names)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(String code, Object[] args)Format a message (based onMessageFormatusing the message from the resource bundles using the given code as a pattern and the given objects as arguments.StringgetMessage(String code)Get a raw message from the resource bundles using the given code.ObjectgetProperty(String name)Retrieves a property value.- 
Methods inherited from class groovy.lang.GroovyObjectSupportgetMetaClass, setMetaClass
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface groovy.lang.GroovyObjectinvokeMethod, setProperty
 
- 
 
- 
- 
- 
Method Detail- 
getMessagepublic String getMessage(String code) Get a raw message from the resource bundles using the given code.
 - 
formatpublic String format(String code, Object[] args) Format a message (based onMessageFormatusing the message from the resource bundles using the given code as a pattern and the given objects as arguments.
 - 
getPropertypublic Object getProperty(String name) Description copied from interface:GroovyObjectRetrieves a property value.- Parameters:
- name- the name of the property of interest
- Returns:
- the given property
- See Also:
- getMessage(String)
 
 
- 
 
-