Package org.forgerock.i18n
Class LocalizableMessageDescriptor.Arg9<T1,T2,T3,T4,T5,T6,T7,T8,T9>
- java.lang.Object
-
- org.forgerock.i18n.LocalizableMessageDescriptor.Arg9<T1,T2,T3,T4,T5,T6,T7,T8,T9>
-
- Type Parameters:
T1
- The type of the first message argument.T2
- The type of the second message argument.T3
- The type of the third message argument.T4
- The type of the fourth message argument.T5
- The type of the fifth message argument.T6
- The type of the sixth message argument.T7
- The type of the seventh message argument.T8
- The type of the eighth message argument.T9
- The type of the ninth message argument.
- Enclosing class:
- LocalizableMessageDescriptor
public static final class LocalizableMessageDescriptor.Arg9<T1,T2,T3,T4,T5,T6,T7,T8,T9> extends Object
Subclass for creating messages with nine arguments.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalizableMessage
get(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
Creates a message with arguments that will replace format specifiers in the associated format string when the message is rendered to string representation.int
ordinal()
Returns the ordinal associated with this message, or-1
if undefined.String
resourceName()
Returns the name of the resource in which this message is defined.
-
-
-
Constructor Detail
-
Arg9
public Arg9(Class<?> sourceClass, String resourceName, String key, int ordinal)
Creates a parameterized instance.- Parameters:
sourceClass
- The class in which this descriptor is defined. This class will be used to obtain theClassLoader
for 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-1
if undefined. A message can be uniquely identified by its ordinal and class.
-
-
Method Detail
-
get
public LocalizableMessage get(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9)
Creates a message with arguments that will replace format specifiers in the associated format string when the message is rendered to string representation.- Parameters:
a1
- A message argument.a2
- A message argument.a3
- A message argument.a4
- A message argument.a5
- A message argument.a6
- A message argument.a7
- A message argument.a8
- A message argument.a9
- A message argument.- Returns:
- The localizable message containing the provided arguments.
-
ordinal
public final int ordinal()
Returns the ordinal associated with this message, or-1
if 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
-1
if undefined.
-
resourceName
public final String 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
null
if this message is a raw message and its source is undefined.
-
-