|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
org.codehaus.groovy.tools.shell.util.MessageSource
public class MessageSource extends GroovyObjectSupport
Message source backed up by one or more java.util.ResourceBundle instances for simple i18n support.
| Constructor Summary | |
MessageSource(java.lang.String[] names)
|
|
MessageSource(java.lang.String name)
|
|
MessageSource(java.lang.Class[] types)
|
|
MessageSource(java.lang.Class type)
|
|
| Method Summary | |
|---|---|
java.lang.String
|
format(java.lang.String code, java.lang.Object[] args)
Format a message (based on java.text.MessageFormat using the message from the resource bundles using the given code as a pattern and the given objects as arguments. |
java.lang.String
|
getMessage(java.lang.String code)
Get a raw message from the resource bundles using the given code. |
java.lang.Object
|
getProperty(java.lang.String name)
@see #getMessage(String) |
| Methods inherited from class GroovyObjectSupport | |
|---|---|
| getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
| Methods inherited from class java.lang.Object | |
|---|---|
| java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
| Constructor Detail |
|---|
public MessageSource(java.lang.String[] names)
public MessageSource(java.lang.String name)
public MessageSource(java.lang.Class[] types)
public MessageSource(java.lang.Class type)
| Method Detail |
|---|
public java.lang.String format(java.lang.String code, java.lang.Object[] args)
public java.lang.String getMessage(java.lang.String code)
public java.lang.Object getProperty(java.lang.String name)
Groovy Documentation