|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opt4j.core.config.Property
public class Property
The Property contains information about a single property of a
PropertyModule.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> |
annotations
|
protected java.lang.reflect.Method |
getter
|
protected java.lang.String |
info
|
protected com.google.inject.Module |
module
|
protected java.lang.String |
name
|
protected int |
order
|
protected java.util.Collection<Requirement> |
requirements
|
protected java.lang.reflect.Method |
setter
|
protected java.lang.Class<?> |
type
|
| Constructor Summary | |
|---|---|
Property(com.google.inject.Module module,
java.lang.String name,
java.lang.Class<?> type,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter,
java.lang.Iterable<java.lang.annotation.Annotation> annotations)
Constructs a Property . |
|
| Method Summary | ||
|---|---|---|
void |
addRequirement(Requirement requirement)
Adds a Requirement. |
|
|
getAnnotation(java.lang.Class<? extends A> clazz)
Returns the annotation of the specified class or null if not existent. |
|
java.util.Collection<java.lang.annotation.Annotation> |
getAnnotations()
Returns the annotations of this property. |
|
java.lang.reflect.Method |
getGetter()
Returns the getter method. |
|
java.lang.String |
getInfo()
Returns the info. |
|
java.lang.String |
getName()
Returns the name. |
|
int |
getOrder()
Returns the order. |
|
java.util.Collection<Requirement> |
getRequirements()
Returns the requirements. |
|
java.lang.reflect.Method |
getSetter()
Returns the setter method. |
|
java.lang.Class<?> |
getType()
Returns the type. |
|
java.lang.Object |
getValue()
Returns the value of the property. |
|
boolean |
isActive()
Returns true if the property is active. |
|
boolean |
isNumber()
Returns true if the property represents a number. |
|
void |
setInfo(java.lang.String info)
Sets the info. |
|
void |
setOrder(int order)
Sets the order. |
|
void |
setValue(java.lang.Object value)
Sets the value of the property. |
|
void |
setValue(java.lang.String value)
Sets the value of the property. |
|
protected void |
setValueObject(java.lang.Object value)
Sets the value of the property. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final com.google.inject.Module module
protected final java.lang.String name
protected final java.lang.Class<?> type
protected final java.lang.reflect.Method getter
protected final java.lang.reflect.Method setter
protected java.lang.String info
protected int order
protected final java.util.Collection<Requirement> requirements
protected final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotations
| Constructor Detail |
|---|
public Property(com.google.inject.Module module,
java.lang.String name,
java.lang.Class<?> type,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter,
java.lang.Iterable<java.lang.annotation.Annotation> annotations)
Property .
module - the modulename - the nametype - the typegetter - the getter methodsetter - the setter methodannotations - the annotations| Method Detail |
|---|
public java.lang.String getInfo()
setInfo(java.lang.String)public void setInfo(java.lang.String info)
info - the info to setgetInfo()public int getOrder()
setOrder(int)public void setOrder(int order)
order - the order to setgetOrder()public java.lang.String getName()
public java.lang.Class<?> getType()
public java.lang.reflect.Method getGetter()
public java.lang.reflect.Method getSetter()
public void addRequirement(Requirement requirement)
Requirement.
requirement - the requirement to addpublic boolean isActive()
true if the property is active.
true if the property is activepublic java.util.Collection<Requirement> getRequirements()
public java.lang.Object getValue()
setValue(java.lang.Object)
public void setValue(java.lang.Object value)
throws java.lang.reflect.InvocationTargetException
value - the value to set
java.lang.reflect.InvocationTargetException - thrown if the value cannot be assignedgetValue()
public void setValue(java.lang.String value)
throws java.lang.reflect.InvocationTargetException
value - the value to set
java.lang.reflect.InvocationTargetException - thrown if the value cannot be assignedpublic boolean isNumber()
true if the property represents a number.
true if the property represents a number
protected void setValueObject(java.lang.Object value)
throws java.lang.reflect.InvocationTargetException
value - the value to set
java.lang.reflect.InvocationTargetException - thrown if the value cannot be assignedpublic java.util.Collection<java.lang.annotation.Annotation> getAnnotations()
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<? extends A> clazz)
A - the annotation typeclazz - the specific annotation class
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||