Package org.forgerock.i18n
Class LocalizableMessageDescriptor.Arg0
java.lang.Object
org.forgerock.i18n.LocalizableMessageDescriptor.Arg0
- Enclosing class:
- LocalizableMessageDescriptor
Subclass for creating messages with no arguments.
-
Constructor Details
-
Arg0
Creates a parameterized instance.- Parameters:
sourceClass- The class in which this descriptor is defined. This class will be used to obtain theClassLoaderfor retrieving theResourceBundle. The class may also be retrieved in order to uniquely identify the source of a message, for example usinggetClass().getPackage().getName().resourceName- The name of the resource bundle containing the localizable message.key- The resource bundle property key.ordinal- The ordinal associated with this descriptor or-1if undefined. A message can be uniquely identified by its ordinal and class.
-
-
Method Details
-
get
Creates a localizable message.- Returns:
- The localizable message.
-
ordinal
public final int ordinal()Returns the ordinal associated with this message, or-1if undefined. A message can be uniquely identified by its resource name and ordinal.This may be useful when an application wishes to identify the source of a message. For example, a logging implementation could log the resource name in addition to the ordinal in order to unambiguously identify a message in a locale independent way.
- Returns:
- The ordinal associated with this descriptor, or
-1if undefined.
-
resourceName
Returns the name of the resource in which this message is defined. A message can be uniquely identified by its resource name and ordinal.This may be useful when an application wishes to identify the source of a message. For example, a logging implementation could log the resource name in addition to the ordinal in order to unambiguously identify a message in a locale independent way.
The resource name may be used for obtaining named loggers, e.g. using SLF4J's
org.slf4j.LoggerFactory#getLogger(String name).- Returns:
- The name of the resource in which this message is defined, or
nullif this message is a raw message and its source is undefined.
-