Package gnu.kawa.reflect
Class FieldLocation<T>
java.lang.Object
gnu.mapping.Location<T>
gnu.kawa.reflect.ClassMemberLocation<T>
gnu.kawa.reflect.FieldLocation<T>
- Direct Known Subclasses:
StaticFieldLocation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
True if the flagsPROCEDURE|SYNTAX|INDIRECT_LOCATION|CONSTANT
are valid.static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionFieldLocation
(Object instance, ClassType type, String mname) FieldLocation
(Object instance, Field field) FieldLocation
(Object instance, String cname, String fname) -
Method Summary
Modifier and TypeMethodDescriptionget()
Get the current value of this location.getField()
getFType()
Get the type of the field.boolean
isBound()
boolean
boolean
boolean
static FieldLocation
make
(Object instance, Declaration decl) static FieldLocation
void
void
setDeclaration
(Declaration decl) void
void
setRestore
(Object oldValue) Restore an old value.void
setWithSave
(T newValue) Set a value, but return cookie so old value can be restored.toString()
Methods inherited from class gnu.kawa.reflect.ClassMemberLocation
define, defineAll, getDeclaringClass, getDeclaringClassname, getInstance, getMemberName, getRClass, getRField, setInstance
-
Field Details
-
PROCEDURE
public static final int PROCEDURE- See Also:
-
SYNTAX
public static final int SYNTAX- See Also:
-
KIND_FLAGS_SET
public static final int KIND_FLAGS_SETTrue if the flagsPROCEDURE|SYNTAX|INDIRECT_LOCATION|CONSTANT
are valid.- See Also:
-
-
Constructor Details
-
FieldLocation
-
FieldLocation
-
FieldLocation
-
-
Method Details
-
isIndirectLocation
public boolean isIndirectLocation() -
setProcedure
public void setProcedure() -
setSyntax
public void setSyntax() -
isProcedureOrSyntax
public boolean isProcedureOrSyntax() -
setDeclaration
-
getField
-
getFType
Get the type of the field. -
getDeclaration
-
get
Description copied from class:Location
Get the current value of this location. -
get
- Overrides:
get
in classClassMemberLocation<T>
-
set
- Overrides:
set
in classClassMemberLocation<T>
-
setWithSave
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 classLocation<T>
-
setRestore
Description copied from class:Location
Restore an old value.- Overrides:
setRestore
in classLocation<T>
- Parameters:
oldValue
- the return value from a prior setWithSave.
-
isConstant
public boolean isConstant()- Overrides:
isConstant
in classClassMemberLocation<T>
-
isBound
public boolean isBound()- Overrides:
isBound
in classClassMemberLocation<T>
-
make
-
make
-
toString
-