|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.plugin.PropertyManager
class PropertyManager
Field Summary | |
---|---|
private static Logger |
log
. |
private Map<String,Property<?>> |
properties
. |
Constructor Summary | |
---|---|
PropertyManager()
|
Method Summary | ||
---|---|---|
|
getProperty(PropertyDescriptor<T> desc)
Returns a property or null if it cannot be found. |
|
private
|
getProperty(String propertyName,
Class<T> type)
Returns a property or null if it cannot be found. |
|
|
getPropertyValue(PropertyDescriptor<T> desc)
Returns a property value or null if it cannot be found. |
|
(package private)
|
parseProperty(PropertyDescriptor<T> desc,
String value)
Set a context property to a new value. |
|
(package private)
|
setProperty(PropertyDescriptor<T> desc,
T value)
Set a context property to a new value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger log
private final Map<String,Property<?>> properties
Constructor Detail |
---|
PropertyManager()
Method Detail |
---|
public <T> T getPropertyValue(PropertyDescriptor<T> desc) throws NullPointerException
T
- the property parameter typedesc
- the property descriptor
NullPointerException
- if the descriptor argument is nullpublic <T> Property<T> getProperty(PropertyDescriptor<T> desc) throws NullPointerException
T
- the property parameter typedesc
- the property descriptor
NullPointerException
- if the descriptor argument is nullprivate <T> Property<T> getProperty(String propertyName, Class<T> type) throws NullPointerException
T
- the property parameter typepropertyName
- the name of the propertytype
- the property type
NullPointerException
- if any argument is null<T> void setProperty(PropertyDescriptor<T> desc, T value) throws NullPointerException
T
- the property parameter typedesc
- the property descriptorvalue
- the property value
NullPointerException
- if the descriptor argument is null<T> void parseProperty(PropertyDescriptor<T> desc, String value) throws NullPointerException, IllegalArgumentException
T
- the property parameter typedesc
- the property descriptorvalue
- the property value
NullPointerException
- if the descriptor argument or the value is null
IllegalArgumentException
- if the string value cannot be converted to the property type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |