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 intTrue if the flagsPROCEDURE|SYNTAX|INDIRECT_LOCATION|CONSTANTare valid.static final intstatic 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.booleanisBound()booleanbooleanbooleanstatic FieldLocationmake(Object instance, Declaration decl) static FieldLocationvoidvoidsetDeclaration(Declaration decl) voidvoidsetRestore(Object oldValue) Restore an old value.voidsetWithSave(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|CONSTANTare 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:LocationGet the current value of this location. -
get
- Overrides:
getin classClassMemberLocation<T>
-
set
- Overrides:
setin classClassMemberLocation<T>
-
setWithSave
Description copied from class:LocationSet 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:
setWithSavein classLocation<T>
-
setRestore
Description copied from class:LocationRestore an old value.- Overrides:
setRestorein classLocation<T>- Parameters:
oldValue- the return value from a prior setWithSave.
-
isConstant
public boolean isConstant()- Overrides:
isConstantin classClassMemberLocation<T>
-
isBound
public boolean isBound()- Overrides:
isBoundin classClassMemberLocation<T>
-
make
-
make
-
toString
-