|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.common.util.Reflection.Property
public static class Reflection.Property

A representation of a property on a Java object.
| Constructor Summary | |
|---|---|
Reflection.Property()
Create a new object property that has no fields initialized. |
|
Reflection.Property(String name,
String label,
String description,
boolean readOnly)
Create a new object property with the supplied parameters set. |
|
Reflection.Property(String name,
String label,
String description,
String category,
boolean readOnly,
Class<?> type,
Object... allowedValues)
Create a new object property with the supplied parameters set. |
|
| Method Summary | |
|---|---|
int |
compareTo(Reflection.Property that)
|
boolean |
equals(Object obj)
|
Collection<?> |
getAllowedValues()
Get the allowed values for this property. |
String |
getCategory()
Get the name of the category in which this property belongs. |
String |
getDescription()
Get the description for this property. |
String |
getLabel()
Get the human-readable label for the property. |
String |
getName()
Get the property name in camel case. |
Class<?> |
getType()
Get the class to which the value must belong (excluding null values). |
int |
hashCode()
|
boolean |
isArrayType()
Determine if this is property's (the type is an array. |
boolean |
isBooleanType()
Determine if this is a boolean property (the type is a Boolean or boolean). |
boolean |
isInferred()
Return whether this property was inferred purely by reflection, or whether annotations were used for its definition. |
boolean |
isPrimitive()
Determine if this is property's (the type is a primitive. |
boolean |
isReadOnly()
Return whether this property is read-only. |
void |
setAllowedValues(Collection<?> allowedValues)
Set the allowed values for this property. |
void |
setAllowedValues(Object... allowedValues)
Set the allowed values for this property. |
void |
setCategory(String category)
Set the name of the category in which this property belongs. |
void |
setDescription(String description)
Set the description for this property. |
void |
setInferred(boolean inferred)
Set whether this property was inferred purely by reflection. |
void |
setLabel(String label)
Set the human-readable label for the property. |
void |
setName(String name)
Set the property name in camel case. |
void |
setReadOnly(boolean readOnly)
Set whether this property is read-only. |
void |
setType(Class<?> type)
Set the class to which the value must belong (excluding null values). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Reflection.Property()
public Reflection.Property(String name,
String label,
String description,
boolean readOnly)
name - the property name; may be nulllabel - the human-readable property label; may be nulldescription - the description for this property; may be nullreadOnly - true if the property is read-only, or false otherwise
public Reflection.Property(String name,
String label,
String description,
String category,
boolean readOnly,
Class<?> type,
Object... allowedValues)
name - the property name; may be nulllabel - the human-readable property label; may be nulldescription - the description for this property; may be nullcategory - the category for this property; may be nullreadOnly - true if the property is read-only, or false otherwisetype - the value class; may be nullallowedValues - the array of allowed values, or null or empty if the values are not constrained| Method Detail |
|---|
public String getName()
public void setName(String name)
name - the nwe property name; may be nullpublic String getLabel()
humanized form of the property name.
public void setLabel(String label)
humanized form of the property name.
label - the new label for the property; may be nullpublic String getDescription()
public void setDescription(String description)
description - the new description for this property; may be nullpublic boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly - true if the property is read-only, or false otherwisepublic String getCategory()
public void setCategory(String category)
category - the category name; may be nullpublic Class<?> getType()
Object.classpublic void setType(Class<?> type)
type - the value class; may be nullpublic boolean isBooleanType()
type is a Boolean or boolean).
public boolean isPrimitive()
type is a primitive.
public boolean isArrayType()
type is an array.
public Collection<?> getAllowedValues()
public void setAllowedValues(Collection<?> allowedValues)
allowedValues - the collection of allowed values, or null or empty if the values are not constrainedpublic void setAllowedValues(Object... allowedValues)
allowedValues - the array of allowed values, or null or empty if the values are not constrainedpublic boolean isInferred()
public void setInferred(boolean inferred)
inferred - true if it was inferred only by reflection, or false if at least one annotation was found and usedpublic int compareTo(Reflection.Property that)
compareTo in interface Comparable<Reflection.Property>Comparable.compareTo(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||