|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.editor.Property
public abstract class Property
Provides access to an editable property of an object.
| Constructor Summary | |
|---|---|
Property()
|
|
| Method Summary | ||
|---|---|---|
abstract Object |
get(Object object)
Retrieves the value of the property. |
|
Editable |
getAnnotation()
Returns a reference to the Editable annotation, which contains simple constraints. |
|
|
getAnnotation(Class<T> clazz)
Returns a reference to the annotation of the specified class, if it exists. |
|
Class<?> |
getArgumentType(Class<?> clazz)
Given a generic class or interface, determines the first actual type argument provided to the given type (for example, passing Collection can be used to determine the type of
collection). |
|
Class<?>[] |
getArgumentTypes(Class<?> clazz)
Given a generic class or interface, determines the actual type arguments provided to the given type (for example, passing Collection can be used to determine the type of
collection). |
|
boolean |
getBoolean(Object object)
Retrieves the value of the property. |
|
byte |
getByte(Object object)
Retrieves the value of the property. |
|
char |
getChar(Object object)
Retrieves the value of the property. |
|
String |
getColorName()
Returns the name of the color lookup for the property. |
|
Class<?>[] |
getComponentSubtypes()
Returns an array containing the available subtypes for components of this (array or collection) type. |
|
Class<?> |
getComponentType()
Returns the component type of this (array or collection) type. |
|
String |
getComponentTypeLabel()
Returns the type label for subtypes of this (array or collection) type's components. |
|
double |
getDouble(Object object)
Retrieves the value of the property. |
|
float |
getFloat(Object object)
Retrieves the value of the property. |
|
Type |
getGenericArgumentType(Class<?> clazz)
Given a generic class or interface, determines the first actual type argument provided to the given type (for example, passing Collection can be used to determine the type of
collection). |
|
Type[] |
getGenericArgumentTypes(Class<?> clazz)
Given a generic class or interface, determines the actual type arguments provided to the given type (for example, passing Collection can be used to determine the type of
collection). |
|
Type |
getGenericComponentType()
Returns the generic component type of this (array or collection) type. |
|
abstract Type |
getGenericType()
Returns the generic property type. |
|
int |
getInt(Object object)
Retrieves the value of the property. |
|
long |
getLong(Object object)
Retrieves the value of the property. |
|
double |
getMaximum()
Returns the maximum value. |
|
int |
getMaxSize()
Returns the maximum size; |
|
abstract Member |
getMember()
Returns the underlying member of the property (the field or method that provides the annotations). |
|
Object |
getMemberObject(Object object)
Returns a reference to the member object (the object to whose member getMember()
refers, given the object one would pass to get(java.lang.Object) or set(java.lang.Object, java.lang.Object)). |
|
String |
getMessageBundle()
Returns the name of the message bundle to use when translating the property name and other bits. |
|
double |
getMinimum()
Returns the minimum value. |
|
int |
getMinSize()
Returns the minimum size. |
|
String |
getMode()
Returns the mode string. |
|
String |
getName()
Returns the name of the property. |
|
double |
getScale()
Returns the scale value. |
|
short |
getShort(Object object)
Retrieves the value of the property. |
|
double |
getStep()
Returns the step value. |
|
Class<?>[] |
getSubtypes()
Returns an array containing the available subtypes of this type. |
|
abstract Class<?> |
getType()
Returns the property type. |
|
String |
getTypeLabel()
Returns the type label for subtypes of this type. |
|
String |
getUnits()
Returns the units string. |
|
boolean |
isAnnotationPresent(Class<? extends Annotation> clazz)
Determines whether the property has an annotation of the specified class. |
|
boolean |
isLegalValue(Object value)
Determines whether the supplied value is legal for this property. |
|
abstract void |
set(Object object,
Object value)
Sets the value of the property. |
|
void |
setBoolean(Object object,
boolean value)
Sets the value of the property. |
|
void |
setByte(Object object,
byte value)
Sets the value of the property. |
|
void |
setChar(Object object,
char value)
Sets the value of the property. |
|
void |
setDouble(Object object,
double value)
Sets the value of the property. |
|
void |
setFloat(Object object,
float value)
Sets the value of the property. |
|
void |
setInt(Object object,
int value)
Sets the value of the property. |
|
void |
setLong(Object object,
long value)
Sets the value of the property. |
|
void |
setShort(Object object,
short value)
Sets the value of the property. |
|
boolean |
shouldTranslateName()
Returns whether or not we should attempt to translate the name. |
|
String |
toString()
|
|
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy, copy, equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Property()
| Method Detail |
|---|
public String getName()
public boolean shouldTranslateName()
public String getColorName()
public Class<?>[] getSubtypes()
public Class<?>[] getComponentSubtypes()
public String getTypeLabel()
public String getComponentTypeLabel()
public String getMessageBundle()
public abstract Member getMember()
public Object getMemberObject(Object object)
getMember()
refers, given the object one would pass to get(java.lang.Object) or set(java.lang.Object, java.lang.Object)).
public abstract Class<?> getType()
public abstract Type getGenericType()
public Class<?> getComponentType()
public Type getGenericComponentType()
public Class<?> getArgumentType(Class<?> clazz)
Collection can be used to determine the type of
collection).
null if not
found.public Class<?>[] getArgumentTypes(Class<?> clazz)
Collection can be used to determine the type of
collection).
null if not found.public Type getGenericArgumentType(Class<?> clazz)
Collection can be used to determine the type of
collection).
null if not
found.public Type[] getGenericArgumentTypes(Class<?> clazz)
Collection can be used to determine the type of
collection).
null if not found.public boolean isLegalValue(Object value)
public String getMode()
public String getUnits()
public double getMinimum()
public double getMaximum()
public double getStep()
public double getScale()
public int getMinSize()
public int getMaxSize()
public Editable getAnnotation()
Editable annotation, which contains simple constraints.
public boolean isAnnotationPresent(Class<? extends Annotation> clazz)
public <T extends Annotation> T getAnnotation(Class<T> clazz)
public boolean getBoolean(Object object)
public byte getByte(Object object)
public char getChar(Object object)
public double getDouble(Object object)
public float getFloat(Object object)
public int getInt(Object object)
public long getLong(Object object)
public short getShort(Object object)
public abstract Object get(Object object)
public void setBoolean(Object object,
boolean value)
public void setByte(Object object,
byte value)
public void setChar(Object object,
char value)
public void setDouble(Object object,
double value)
public void setFloat(Object object,
float value)
public void setInt(Object object,
int value)
public void setLong(Object object,
long value)
public void setShort(Object object,
short value)
public abstract void set(Object object,
Object value)
public String toString()
toString in class DeepObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||