|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.util.PropertyUtils
public class PropertyUtils
Utilities for working with property files.
| Constructor Summary | |
|---|---|
PropertyUtils()
|
|
| Method Summary | ||
|---|---|---|
static boolean |
containsProperty(java.lang.String propertyName,
java.util.Properties properties)
Checks whether the property with the given name exists in the System or in the given properties. |
|
static boolean |
getBoolean(java.lang.String propertyName,
boolean defaultValue,
java.util.Properties properties)
Gets the boolean value for the property with the given name. |
|
static boolean |
getBoolean(java.lang.String propertyName,
java.util.Properties properties)
Gets the boolean value for the property with the given name. |
|
static
|
getInstance(java.lang.String propertyName,
java.util.Properties properties)
Gets an instance of the type specified by the property with the given name. |
|
static
|
getInstance(java.lang.String propertyName,
T defaultValue,
java.util.Properties properties)
Gets an instance of the type specified by the property with the given name. |
|
static int |
getInt(java.lang.String propertyName,
int defaultValue,
java.util.Properties properties)
Gets the int value for the property with the given name. |
|
static int |
getInt(java.lang.String propertyName,
java.util.Properties properties)
Gets the int value for the property with the given name. |
|
static long |
getLong(java.lang.String propertyName,
long defaultValue,
java.util.Properties properties)
Gets the long value for the property with the given name. |
|
static long |
getLong(java.lang.String propertyName,
java.util.Properties properties)
Gets the long value for the property with the given name. |
|
static java.lang.String |
getString(java.lang.String propertyName,
java.util.Properties properties)
Gets the string value for the property with the given name. |
|
static java.lang.String |
getString(java.lang.String propertyName,
java.lang.String defaultValue,
java.util.Properties properties)
Gets the string value for the property with the given name. |
|
static java.util.List<java.lang.String> |
getStringList(java.lang.String propertyName,
java.util.Properties properties)
Gets the list of comma separated string values for the property with the given name. |
|
static java.util.List<java.lang.String> |
getStringList(java.lang.String propertyName,
java.util.Properties properties,
boolean required)
Gets the list of comma separated string values for the property with the given name. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyUtils()
| Method Detail |
|---|
public static java.lang.String getString(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The name, not nullproperties - The properties, not null
public static java.lang.String getString(java.lang.String propertyName,
java.lang.String defaultValue,
java.util.Properties properties)
propertyName - The name, not nulldefaultValue - The default valueproperties - The properties, not null
public static java.util.List<java.lang.String> getStringList(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The name, not nullproperties - The properties, not null
public static java.util.List<java.lang.String> getStringList(java.lang.String propertyName,
java.util.Properties properties,
boolean required)
propertyName - The name, not nullproperties - The properties, not nullrequired - If true an exception will be raised when the property is not found or empty
public static boolean getBoolean(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The name, not nullproperties - The properties, not null
public static boolean getBoolean(java.lang.String propertyName,
boolean defaultValue,
java.util.Properties properties)
propertyName - The name, not nulldefaultValue - The default valueproperties - The properties, not null
public static long getLong(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The name, not nullproperties - The properties, not null
public static long getLong(java.lang.String propertyName,
long defaultValue,
java.util.Properties properties)
propertyName - The name, not nulldefaultValue - The default valueproperties - The properties, not null
public static int getInt(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The name, not nullproperties - The properties, not null
public static int getInt(java.lang.String propertyName,
int defaultValue,
java.util.Properties properties)
propertyName - The name, not nulldefaultValue - The default valueproperties - The properties, not null
public static boolean containsProperty(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The property name, not nullproperties - The properties if not found in System, not null
public static <T> T getInstance(java.lang.String propertyName,
java.util.Properties properties)
propertyName - The name, not nullproperties - The properties, not null
public static <T> T getInstance(java.lang.String propertyName,
T defaultValue,
java.util.Properties properties)
propertyName - The name, not nulldefaultValue - The default valueproperties - The properties, not null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||