org.apache.geronimo.gshell.i18n
Class ResourceBundleMessageSource
java.lang.Object
org.apache.geronimo.gshell.i18n.ResourceBundleMessageSource
- All Implemented Interfaces:
- MessageSource
public class ResourceBundleMessageSource
- extends Object
- implements MessageSource
Message source backed up by one or more ResourceBundle instances for simple i18n support.
- Version:
- $Rev: 572585 $ $Date: 2007-09-04 01:52:44 -0700 (Tue, 04 Sep 2007) $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceBundleMessageSource
public ResourceBundleMessageSource(String[] names)
ResourceBundleMessageSource
public ResourceBundleMessageSource(String name)
ResourceBundleMessageSource
public ResourceBundleMessageSource(Class[] types)
ResourceBundleMessageSource
public ResourceBundleMessageSource(Class type)
getMessage
public String getMessage(String code)
- Get a raw message from the resource bundles using the given code.
- Specified by:
getMessage in interface MessageSource
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.
- Specified by:
format in interface MessageSource
getProperty
public Object getProperty(String name)
- See Also:
getMessage(String)
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.