public class Property extends Object
Property contains information about a single property of a
PropertyModule.| Constructor and Description |
|---|
Property(com.google.inject.Module module,
String name,
Class<?> type,
Method getter,
Method setter,
Iterable<Annotation> annotations)
Constructs a
Property . |
| Modifier and Type | Method and Description |
|---|---|
void |
addRequirement(Requirement requirement)
Adds a
Requirement. |
<A extends Annotation> |
getAnnotation(Class<? extends A> clazz)
Returns the annotation of the specified class or null if not existent.
|
Collection<Annotation> |
getAnnotations()
Returns the annotations of this property.
|
Method |
getGetter()
Returns the getter method.
|
String |
getInfo()
Returns the info.
|
String |
getName()
Returns the name.
|
int |
getOrder()
Returns the order.
|
Collection<Requirement> |
getRequirements()
Returns the requirements.
|
Method |
getSetter()
Returns the setter method.
|
Class<?> |
getType()
Returns the type.
|
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(String info)
Sets the info.
|
void |
setOrder(int order)
Sets the order.
|
void |
setValue(Object value)
Sets the value of the property.
|
void |
setValue(String value)
Sets the value of the property.
|
public Property(com.google.inject.Module module,
String name,
Class<?> type,
Method getter,
Method setter,
Iterable<Annotation> annotations)
Property .module - the modulename - the nametype - the typegetter - the getter methodsetter - the setter methodannotations - the annotationspublic String getInfo()
setInfo(java.lang.String)public void setInfo(String info)
info - the info to setgetInfo()public int getOrder()
setOrder(int)public void setOrder(int order)
order - the order to setgetOrder()public String getName()
public Class<?> getType()
public Method getGetter()
public 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 Collection<Requirement> getRequirements()
public Object getValue()
setValue(java.lang.Object)public void setValue(Object value) throws InvocationTargetException
value - the value to setInvocationTargetException - thrown if the value cannot be assignedgetValue()public void setValue(String value) throws InvocationTargetException
value - the value to setInvocationTargetException - thrown if the value cannot be assignedpublic boolean isNumber()
true if the property represents a number.true if the property represents a numberpublic Collection<Annotation> getAnnotations()
public <A extends Annotation> A getAnnotation(Class<? extends A> clazz)
A - the annotation typeclazz - the specific annotation class