java.util.Properties
objects.
| Modifier and Type | Field and Description |
|---|---|
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public static String | Returns: The property value; may be null.The name of the property for which to extract value propertyName, Properties The properties object properties)Extract a property value by name from the given properties object. |
| public static boolean | Returns: The property value.The name of the property for which to retrieve value propertyName, Properties The properties object properties)Get a property value as a boolean. |
| public static boolean | Returns: The property value.The name of the property for which to retrieve value propertyName, Properties The properties object properties, boolean The default property value to use. defaultValue)Get a property value as a boolean. |
| public static int | Returns: The property value.The name of the property for which to retrieve value propertyName, Properties The properties object properties, int The default property value to use. defaultValue)Get a property value as an int. |
| public static Integer | Returns: The property value; may be null.The name of the property for which to retrieve value propertyName, Properties The properties object properties)Get a property value as an Integer. |
| public static String | Returns: The property value; may be null.The name of the property for which to retrieve value propertyName, Properties The properties object properties, String The default property value to use. defaultValue)Get a property value as a string. |
| public static Properties | Returns: cloned and masked propertiesproperties to check props, String proeprty to mask key)replace a property by a starred version |
| public static String | Returns: The (possibly) interpolated property value.The property value to be processed for interpolation. property)Handles interpolation processing for a single property. |
| public static void | resolvePlaceHolders(Properties
The properties object. properties)Handles interpolation processing for all entries in a properties object. |
| public static Map | Returns: The resulting map; never null, though perhaps empty.The name of the property for which to retrieve value propertyName, String The string defining tokens used as both entry and key/value delimiters. delim, Properties The properties object properties)Constructs a map from a property value. |
| public static String[] | Returns: The array; never null, though may be empty.The name of the property for which to retrieve value propertyName, String The delimiter used to separate individual array elements. delim, Properties The properties object properties)Get a property value as a string array. |
| public static String[] | Returns: The array; never null, though may be empty.The string form of the string array. stringForm, String The delimiter used to separate individual array elements. delim)Convert a string to an array of strings. |
| PLACEHOLDER_START | back to summary |
|---|---|
| private static final String PLACEHOLDER_START | |
| PropertiesHelper | back to summary |
|---|---|
| private PropertiesHelper() Disallow instantiation | |
| extractFromSystem | back to summary |
|---|---|
| private static String extractFromSystem(String systemPropertyName) | |
| extractPropertyValue | back to summary |
|---|---|
| public static String extractPropertyValue(String propertyName, Properties properties) Extract a property value by name from the given properties object. Both null and empty string are viewed as the same, and return null.
| |
| getBoolean | back to summary |
|---|---|
| public static boolean getBoolean(String propertyName, Properties properties) Get a property value as a boolean. Shorthand for calling
| |
| getBoolean | back to summary |
|---|---|
| public static boolean getBoolean(String propertyName, Properties properties, boolean defaultValue) Get a property value as a boolean.
First, the string value is extracted, and then
| |
| getInt | back to summary |
|---|---|
| public static int getInt(String propertyName, Properties properties, int defaultValue) Get a property value as an int.
First, the string value is extracted, and then
| |
| getInteger | back to summary |
|---|---|
| public static Integer getInteger(String propertyName, Properties properties) Get a property value as an Integer.
First, the string value is extracted, and then
| |
| getString | back to summary |
|---|---|
| public static String getString(String propertyName, Properties properties, String defaultValue) Get a property value as a string.
| |
| maskOut | back to summary |
|---|---|
| public static Properties maskOut(Properties props, String key) replace a property by a starred version
| |
| resolvePlaceHolder | back to summary |
|---|---|
| public static String resolvePlaceHolder(String property) Handles interpolation processing for a single property. | |
| resolvePlaceHolders | back to summary |
|---|---|
| public static void resolvePlaceHolders(Properties properties) Handles interpolation processing for all entries in a properties object.
| |
| toMap | back to summary |
|---|---|
| public static Map Constructs a map from a property value. The exact behavior here is largely dependant upon what is passed in as the delimiter.
| |
| toStringArray | back to summary |
|---|---|
| public static String[] toStringArray(String propertyName, String delim, Properties properties) Get a property value as a string array.
| |
| toStringArray | back to summary |
|---|---|
| public static String[] toStringArray(String stringForm, String delim) Convert a string to an array of strings. The assumption is that the individual array elements are delimited in the source stringForm param by the delim param. | |