Package gnu.kawa.reflect
Class ClassMemberLocation<T>
java.lang.Object
gnu.mapping.Location<T>
gnu.kawa.reflect.ClassMemberLocation<T>
- Direct Known Subclasses:
FieldLocation
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.)
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionClassMemberLocation
(Object instance, ClassType type, String mname) ClassMemberLocation
(Object instance, Class clas, String mname) ClassMemberLocation
(Object instance, Field field) ClassMemberLocation
(Object instance, String cname, String mname) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
defineAll
(Object instance, Language language, Environment env) Import all the public fields of an object.final Object
Return theClass
this member is in.boolean
isBound()
boolean
void
final void
setInstance
(Object obj) Methods inherited from class gnu.mapping.Location
define, entered, get, getBase, getKeyProperty, getKeySymbol, getValue, make, make, make, print, setRestore, setValue, setWithSave, toString, undefine
-
Constructor Details
-
ClassMemberLocation
-
ClassMemberLocation
-
ClassMemberLocation
-
ClassMemberLocation
-
-
Method Details
-
getInstance
-
setInstance
-
getMemberName
-
getDeclaringClass
-
getDeclaringClassname
-
getRField
-
getRClass
Return theClass
this member is in. -
get
-
isConstant
public boolean isConstant()- Overrides:
isConstant
in classLocation<T>
-
isBound
public boolean isBound() -
set
-
define
public static void define(Object instance, Field rfield, String uri, Language language, Environment env) throws IllegalAccessException - Throws:
IllegalAccessException
-
defineAll
public static void defineAll(Object instance, Language language, Environment env) throws IllegalAccessException Import all the public fields of an object.- Throws:
IllegalAccessException
-