java.lang.Object
org.hsqldb.lib.ValidatingResourceBundle
Purpose of this class is to wrap a RefCapablePropertyResourceBundle to
reliably detect any possible use of a missing property key as soon as
this class is clinitted.
The reason for this is to allow us developers to detect all such errors
before end-users ever use this class.
See SqltoolRB for an example implementation of this abstract class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionValidatingResourceBundle
(String baseName, Class<? extends Enum<?>> enumType) -
Method Summary
Modifier and TypeMethodDescriptiongetExpandedString
(Enum<?> key) getExpandedString
(Enum<?> key, String... strings) int
int
static String
resourceKeyFor
(Enum<?> enumKey) void
setMissingPosValueBehavior
(int missingPosValueBehavior) Set behavior for get*String(String, String[]) method when a positional index (like %{4}) is used but no subs value was given for that index.void
setMissingPropertyBehavior
(int missingPropertyBehavior) Set behavior for get*String*() method when a referred-to System Property is not set.void
validate()
-
Field Details
-
THROW_BEHAVIOR
public static final int THROW_BEHAVIOR- See Also:
-
EMPTYSTRING_BEHAVIOR
public static final int EMPTYSTRING_BEHAVIOR- See Also:
-
NOOP_BEHAVIOR
public static final int NOOP_BEHAVIOR- See Also:
-
-
Constructor Details
-
ValidatingResourceBundle
-
-
Method Details
-
resourceKeyFor
-
getString
- Parameters:
key
- Enum- Returns:
- String
- See Also:
-
getString
- Parameters:
key
- Enumstrings
- String[]- Returns:
- String
- See Also:
-
getExpandedString
- Parameters:
key
- Enum- Returns:
- String
- See Also:
-
getExpandedString
- Parameters:
key
- Enumstrings
- String[]- Returns:
- String
- See Also:
-
setMissingPropertyBehavior
public void setMissingPropertyBehavior(int missingPropertyBehavior) Set behavior for get*String*() method when a referred-to System Property is not set. Set to one of- RefCapablePropertyResourceBundle.THROW_BEHAVIOR
- RefCapablePropertyResourceBundle.EMPTYSTRING_BEHAVIOR
- RefCapablePropertyResourceBundle.NOOP_BEHAVIOR
- Parameters:
missingPropertyBehavior
- int
-
setMissingPosValueBehavior
public void setMissingPosValueBehavior(int missingPosValueBehavior) Set behavior for get*String(String, String[]) method when a positional index (like %{4}) is used but no subs value was given for that index. Set to one of- RefCapablePropertyResourceBundle.THROW_BEHAVIOR
- RefCapablePropertyResourceBundle.EMPTYSTRING_BEHAVIOR
- RefCapablePropertyResourceBundle.NOOP_BEHAVIOR
- Parameters:
missingPosValueBehavior
- int
-
getMissingPropertyBehavior
public int getMissingPropertyBehavior() -
getMissingPosValueBehavior
public int getMissingPosValueBehavior() -
validate
public void validate() -
getString
-
getString
-
getString
-
getString
-
getString
-
getString
-
getString
-
getString
-
getString
-
getString
-
getString
-