Enum Class PropertyFileUtil.PropertyFileUtilFileKindEnum
- All Implemented Interfaces:
Serializable, Comparable<PropertyFileUtil.PropertyFileUtilFileKindEnum>, Constable
- Enclosing class:
PropertyFileUtil
The first argument of the enum value (like "application", "messages", ...)
is called filePrefix,
which is the file literally the prefix of the property files.
But in some reasons some properties file kind need to have multiple file prefixes
so the second argument actualFilePrefixes needed.
actualFilePrefixes is a data type of String[][].
If you want to simply use multiple prefixes, it's realized by
new String[][] {new String[] {messages1, messages2}}.
With this prefix setting PropertyFileUtilValueGetter searches the key
from files with these prefixes, and duplication of the key causes an error.
When you know messages1 and messages2 has duplication and
if messages1 contains the key you don't want to search from messages2,
it can be realized by this setting.
new String[][] {new String[] {messages1}, new String[] {messages2}}.
Outside array manipulates the priority of the property files.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionapplication.properties.enum_names.item_names.messages.properties.messagesWithItemNames.properties.strings.properties.ValidationMessags.ValidationMessagsWithField. -
Method Summary
-
Enum Constant Details
-
APPLICATION
application.properties. -
MESSAGES
messages.properties. -
MESSAGES_WITH_ITEM_NAMES
messagesWithItemNames.properties.Generally, messages.properties is supposed to be used for messages, and messagesWithItemNames is not very understandable for users. Besides that, since the case that both messages.properties and messagesWithItemNames.properties are used is very rare, it's better for messages.properties to be used even when you treat "messages with item names" without that rare case. That's why messages.properties is also contained with this value.
-
STRINGS
strings.properties. -
ITEM_NAMES
item_names. -
ENUM_NAMES
enum_names. -
VALIDATION_MESSAGES
ValidationMessags. -
VALIDATION_MESSAGES_WITH_ITEM_NAMES
public static final PropertyFileUtil.PropertyFileUtilFileKindEnum VALIDATION_MESSAGES_WITH_ITEM_NAMESValidationMessagsWithField. -
VALIDATION_MESSAGES_PATTERN_DESCRIPTIONS
public static final PropertyFileUtil.PropertyFileUtilFileKindEnum VALIDATION_MESSAGES_PATTERN_DESCRIPTIONS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getActualFilePrefixes
-
throwsExceptionWhenKeyDoesNotExist
public boolean throwsExceptionWhenKeyDoesNotExist()Returns throwsExceptionWhenKeyDoesNotExist.
-