Module net.sourceforge.argparse4j
Class TypeNameLocalization
- java.lang.Object
-
- net.sourceforge.argparse4j.helper.TypeNameLocalization
-
public class TypeNameLocalization extends java.lang.Object
Localization of names for argument types. Localized names for commonly used types in the JDK (e.g.
Integer
andBoolean
) are provided, but for custom types, the developer of the type must provide the localization. This class tries to load the display name by using the following sources. The first display name that is found is used:- Key
displayName
of resource bundle<fully-qualified custom type name>-argparse4j
(with the dots replaced by slashes). - Key
type.<simple class name of the type>
of resource bundlenet/sourceforge/argparse4j/internal/ArgumentParserImpl
. - The simple class name of the type.
The application code should not use this class directly.
- Since:
- 0.8.0
- Key
-
-
Constructor Summary
Constructors Modifier Constructor Description private
TypeNameLocalization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
localizeTypeName(ArgumentParser parser, java.lang.Class<?> type)
static java.lang.String
localizeTypeNameIfPossible(ArgumentParser parser, java.lang.Class<?> type)
-
-
-
Method Detail
-
localizeTypeNameIfPossible
public static java.lang.String localizeTypeNameIfPossible(ArgumentParser parser, java.lang.Class<?> type)
-
localizeTypeName
private static java.lang.String localizeTypeName(ArgumentParser parser, java.lang.Class<?> type)
-
-