com.threerings.editor
Class MethodProperty

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.editor.Property
          extended by com.threerings.editor.MethodProperty
All Implemented Interfaces:
Copyable, Cloneable

public class MethodProperty
extends Property

A property accessed through a pair of getter/setter methods.


Field Summary
protected  Method _getter
          The getter and setter methods.
protected  Method _setter
          The getter and setter methods.
 
Fields inherited from class com.threerings.editor.Property
_argumentTypes, _configTypes, _genericArgumentTypes, _name
 
Constructor Summary
MethodProperty(Method getter, Method setter)
          Creates a new method property.
 
Method Summary
 Object get(Object object)
          Retrieves the value of the property.
 Type getGenericType()
          Returns the generic property type.
 Member getMember()
          Returns the underlying member of the property (the field or method that provides the annotations).
 Class<?> getType()
          Returns the property type.
 void set(Object object, Object value)
          Sets the value of the property.
 
Methods inherited from class com.threerings.editor.Property
addSubtypes, addSubtypes, getAnnotation, getAnnotation, getArgumentType, getArgumentTypes, getBoolean, getByte, getChar, getColorName, getComponentSubtypes, getComponentType, getComponentTypeLabel, getDouble, getEditorTypes, getFloat, getGenericArgumentType, getGenericArgumentTypes, getGenericComponentType, getInt, getLong, getMaximum, getMaxSize, getMemberObject, getMessageBundle, getMinimum, getMinSize, getMode, getName, getScale, getShort, getStep, getSubtypes, getSubtypes, getTypeArguments, getTypeArguments, getTypeArguments, getTypeClass, getTypeLabel, getTypeLabel, getUnits, isAnnotationPresent, isLegalValue, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, shouldTranslateName, toString
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_getter

protected Method _getter
The getter and setter methods.


_setter

protected Method _setter
The getter and setter methods.

Constructor Detail

MethodProperty

public MethodProperty(Method getter,
                      Method setter)
Creates a new method property.

Method Detail

getMember

public Member getMember()
Description copied from class: Property
Returns the underlying member of the property (the field or method that provides the annotations).

Specified by:
getMember in class Property

getType

public Class<?> getType()
Description copied from class: Property
Returns the property type.

Specified by:
getType in class Property

getGenericType

public Type getGenericType()
Description copied from class: Property
Returns the generic property type.

Specified by:
getGenericType in class Property

get

public Object get(Object object)
Description copied from class: Property
Retrieves the value of the property.

Specified by:
get in class Property

set

public void set(Object object,
                Object value)
Description copied from class: Property
Sets the value of the property.

Specified by:
set in class Property