Groovy 1.7.10

## org.codehaus.groovy.tools.shell.util
[Java] Class MessageSource

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          org.codehaus.groovy.tools.shell.util.MessageSource

    public class MessageSource
    extends GroovyObjectSupport

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

Authors:
  Jason Dillon

Version:
  \$Id: MessageSource.java 19544 2010-03-11 08:05:55Z paulk \$

Constructor Summary
`MessageSource(String[] names)`
`MessageSource(String name)`
`MessageSource(Class[] types)`
`MessageSource(Class type)`

Method Summary
`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)

Methods inherited from class GroovyObjectSupport
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

### MessageSource

    public MessageSource(String[] names)

### MessageSource

    public MessageSource(String name)

### MessageSource

    public MessageSource(Class[] types)

### MessageSource

    public MessageSource(Class type)

Method Detail

### 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.

### getMessage

    public String getMessage(String code)

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

### getProperty

    public Object getProperty(String name)

  See Also:
    getMessage(String)

Copyright © 2003-2010 The Codehaus. All rights reserved.