Enum LocalizationResolver
- java.lang.Object
-
- java.lang.Enum<LocalizationResolver>
-
- net.anotheria.anosite.localization.LocalizationResolver
-
- All Implemented Interfaces:
Serializable,Comparable<LocalizationResolver>
public enum LocalizationResolver extends Enum<LocalizationResolver>
Not real resolver but some workaround as localizations adder from LocalizationMap and TextResources. Will be rewritten with new Localization Framework.- Author:
- denis
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalizedMessage(String key)protected TextResourcegetTextResourceByName(String key)Returns a text resource by its name.static LocalizationResolvervalueOf(String name)Returns the enum constant of this type with the specified name.static LocalizationResolver[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final LocalizationResolver INSTANCE
-
-
Method Detail
-
values
public static LocalizationResolver[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LocalizationResolver c : LocalizationResolver.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LocalizationResolver valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getTextResourceByName
protected TextResource getTextResourceByName(String key) throws RuntimeException
Returns a text resource by its name.- Parameters:
key- - name of the resource.- Returns:
- TextResource.
- Throws:
RuntimeException- on ResourceService failure
-
-