gnu.kawa.reflect
Class ClassMemberLocation
java.lang.Object
gnu.mapping.Location
gnu.kawa.reflect.ClassMemberLocation
- Direct Known Subclasses:
- FieldLocation
public class ClassMemberLocation
- extends Location
A Location whose value is that of a named field/method of an object.
The object is used as the owning Location's value.
(For now, only fields are supported.)
Methods inherited from class gnu.mapping.Location |
entered, get, getBase, getKeyProperty, getKeySymbol, getValue, make, make, make, print, setRestore, setValue, setWithSave, toString, undefine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClassMemberLocation
public ClassMemberLocation(java.lang.Object instance,
ClassType type,
java.lang.String mname)
ClassMemberLocation
public ClassMemberLocation(java.lang.Object instance,
java.lang.Class clas,
java.lang.String mname)
ClassMemberLocation
public ClassMemberLocation(java.lang.Object instance,
java.lang.reflect.Field field)
getInstance
public final java.lang.Object getInstance()
setInstance
public final void setInstance(java.lang.Object obj)
getMemberName
public java.lang.String getMemberName()
getDeclaringClass
public ClassType getDeclaringClass()
getRField
public java.lang.reflect.Field getRField()
get
public java.lang.Object get(java.lang.Object defaultValue)
- Specified by:
get
in class Location
isConstant
public boolean isConstant()
- Overrides:
isConstant
in class Location
isBound
public boolean isBound()
- Overrides:
isBound
in class Location
set
public void set(java.lang.Object value)
- Specified by:
set
in class Location
define
public static void define(java.lang.Object instance,
java.lang.reflect.Field rfield,
java.lang.String uri,
Language language,
Environment env)
throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
defineAll
public static void defineAll(java.lang.Object instance,
Environment env)
throws java.lang.IllegalAccessException
- Import all the public fields of an object.
- Throws:
java.lang.IllegalAccessException