com.threerings.presents.dobj
Class Accessor
java.lang.Object
com.threerings.presents.dobj.Accessor
- All Implemented Interfaces:
- Comparable<Accessor>
- Direct Known Subclasses:
- Accessor.ByField
public abstract class Accessor
- extends Object
- implements Comparable<Accessor>
Used by DObject to provide dynamic access to its fields. This class is an implementation
detail that can be safely ignored. It is only a public top-level class to ensure that bindings
for other languages can make use of it without complications.
|
Nested Class Summary |
static class |
Accessor.ByField
An accessor that assumes DObject fields are public Java fields. |
|
Field Summary |
String |
name
The name of this attribute. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public final String name
- The name of this attribute.
Accessor
protected Accessor(String name)
get
public abstract Object get(DObject obj)
- Gets the current value of this attribute.
set
public abstract void set(DObject obj,
Object value)
- Updates the current value of this attribute.
compareTo
public int compareTo(Accessor other)
- Specified by:
compareTo in interface Comparable<Accessor>