Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.ioc.internal.util
Class MessagesImpl

    java.lang.Object
      org.apache.tapestry5.ioc.util.AbstractMessages
          org.apache.tapestry5.ioc.internal.util.MessagesImpl

All Implemented Interfaces:
  Messages

    public class MessagesImpl

extends AbstractMessages

Implementation of `Messages` based around a `ResourceBundle`.

Constructor Summary
`MessagesImpl(java.util.Locale locale, java.util.ResourceBundle bundle)`

Method Summary
`static Messages` | `forClass(java.lang.Class forClass)` Finds the messages for a given Messages utility class.
`protected java.lang.String` | `valueForKey(java.lang.String key)` Invoked to provide the value for a particular key.

Methods inherited from class org.apache.tapestry5.ioc.util.AbstractMessages
`contains, format, get, getFormatter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessagesImpl

    public MessagesImpl(java.util.Locale locale,
                        java.util.ResourceBundle bundle)

Method Detail

### forClass

    public static Messages forClass(java.lang.Class forClass)

  Finds the messages for a given Messages utility class. Strings the trailing "Messages" and replaces it with "Strings" to form the base path. Loads the bundle using the default locale, and the class' class loader.

  Parameters:
    `forClass` -
  Returns:
    Messages for the class

### valueForKey

    protected java.lang.String valueForKey(java.lang.String key)

  Description copied from class: `AbstractMessages`
  Invoked to provide the value for a particular key. This may be invoked multiple times even for the same key. The implementation should ignore the case of the key.

  Specified by:
    `valueForKey` in class `AbstractMessages`
  Parameters:
    `key` - the key to obtain a value for (case insensitive)
  Returns:
    the value for the key, or null if this instance can not provide the value

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.