gnu.kawa.reflect
Class FieldLocation
java.lang.Object
gnu.mapping.Location
gnu.kawa.reflect.ClassMemberLocation
gnu.kawa.reflect.FieldLocation
- Direct Known Subclasses:
- StaticFieldLocation
public class FieldLocation
- extends ClassMemberLocation
Field Summary |
static int |
KIND_FLAGS_SET
True if the flags PROCEDURE|SYNTAX|INDIRECT_LOCATION|CONSTANT
are valid. |
static int |
PROCEDURE
|
static int |
SYNTAX
|
Constructor Summary |
FieldLocation(java.lang.Object instance,
ClassType type,
java.lang.String mname)
|
FieldLocation(java.lang.Object instance,
java.lang.reflect.Field field)
|
FieldLocation(java.lang.Object instance,
java.lang.String cname,
java.lang.String fname)
|
Methods inherited from class gnu.mapping.Location |
entered, get, getBase, getKeyProperty, getKeySymbol, getValue, make, make, make, print, setValue, undefine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PROCEDURE
public static final int PROCEDURE
- See Also:
- Constant Field Values
SYNTAX
public static final int SYNTAX
- See Also:
- Constant Field Values
KIND_FLAGS_SET
public static final int KIND_FLAGS_SET
- True if the flags
PROCEDURE|SYNTAX|INDIRECT_LOCATION|CONSTANT
are valid.
- See Also:
- Constant Field Values
FieldLocation
public FieldLocation(java.lang.Object instance,
java.lang.String cname,
java.lang.String fname)
FieldLocation
public FieldLocation(java.lang.Object instance,
ClassType type,
java.lang.String mname)
FieldLocation
public FieldLocation(java.lang.Object instance,
java.lang.reflect.Field field)
isIndirectLocation
public boolean isIndirectLocation()
setProcedure
public void setProcedure()
setSyntax
public void setSyntax()
isProcedureOrSyntax
public boolean isProcedureOrSyntax()
setDeclaration
public void setDeclaration(Declaration decl)
getField
public Field getField()
getFType
public Type getFType()
- Get the type of the field.
getDeclaration
public Declaration getDeclaration()
get
public java.lang.Object get(java.lang.Object defaultValue)
- Overrides:
get
in class ClassMemberLocation
set
public void set(java.lang.Object newValue)
- Overrides:
set
in class ClassMemberLocation
setWithSave
public java.lang.Object setWithSave(java.lang.Object newValue)
- Description copied from class:
Location
- Set a value, but return cookie so old value can be restored.
This is intended for fluid-let where (in the case of multiple threads)
a simple save-restore isn't always the right thing.
- Overrides:
setWithSave
in class Location
setRestore
public void setRestore(java.lang.Object oldValue)
- Description copied from class:
Location
- Restore an old value.
- Overrides:
setRestore
in class Location
- Parameters:
oldValue
- the return value from a prior setWithSave.
isConstant
public boolean isConstant()
- Overrides:
isConstant
in class ClassMemberLocation
isBound
public boolean isBound()
- Overrides:
isBound
in class ClassMemberLocation
make
public static FieldLocation make(java.lang.Object instance,
Declaration decl)
make
public static FieldLocation make(java.lang.Object instance,
java.lang.String cname,
java.lang.String fldName)
toString
public java.lang.String toString()
- Overrides:
toString
in class Location