Package org.jboss.test.audit.config
Class RuntimeProperties
- java.lang.Object
-
- org.jboss.test.audit.config.RuntimeProperties
-
public class RuntimeProperties extends Object
Utility class to load deployment properties- Author:
- Pete Muir
-
-
Field Summary
Fields Modifier and Type Field Description static StringRESOURCE_BUNDLE
-
Constructor Summary
Constructors Constructor Description RuntimeProperties()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBooleanValue(String propertyName, boolean _default, boolean required)<T> Set<Class<T>>getClasses(String propertyName, Class<T> expectedType)Gets the possible implementation class for a given property for which the values are classanames<T> Class<T>getClassValue(String propertyName, Class<T> expectedType, boolean required)<T> TgetInstanceValue(String propertyName, Class<T> expectedType, boolean required)intgetIntValue(String propertyName, int _default, boolean required)List<String>getPropertyValues(String key)Get a list of possible values for a given key.StringgetStringValue(String propertyName, String _default, boolean required)
-
-
-
Field Detail
-
RESOURCE_BUNDLE
public static final String RESOURCE_BUNDLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPropertyValues
public List<String> getPropertyValues(String key)
Get a list of possible values for a given key. First, System properties are tried, followed by the specified resource bundle (first in classpath only).- Parameters:
key- The key to search for- Returns:
- A list of possible values. An empty list is returned if there are no matches.
-
getClasses
public <T> Set<Class<T>> getClasses(String propertyName, Class<T> expectedType)
Gets the possible implementation class for a given property for which the values are classanames- Parameters:
propertyName- The name of the property to loadexpectedType- expected type- Returns:
- A set of classes specified
-
getClassValue
public <T> Class<T> getClassValue(String propertyName, Class<T> expectedType, boolean required)
-
getInstanceValue
public <T> T getInstanceValue(String propertyName, Class<T> expectedType, boolean required)
-
getBooleanValue
public boolean getBooleanValue(String propertyName, boolean _default, boolean required)
-
getIntValue
public int getIntValue(String propertyName, int _default, boolean required)
-
-