Package gnu.kawa.reflect
Class SlotGet
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.Procedure2
gnu.kawa.reflect.SlotGet
- All Implemented Interfaces:
Inlineable
,HasSetter
,Named
-
Field Summary
FieldsFields inherited from class gnu.mapping.Procedure2
applyToObject
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
compile
(ApplyExp exp, Compilation comp, Target target) static Object
static Object
getSlotValue
(boolean isStatic, Object obj, String name, String fname, String getName, String isName, Language language) The actual gets of finding the field value.static Member
lookupMember
(ObjectType clas, String name, ClassType caller) Get a named property - field or member class or 'get' accessor method.static ApplyExp
makeGetField
(Expression value, String fieldName) Convenience method to make an Expression that gets the value of a field.void
void
static Object
staticField
(Object obj, String fname) Methods inherited from class gnu.mapping.Procedure2
apply0, apply1, apply3, apply4, applyN, applyToObject, numArgs
Methods inherited from class gnu.mapping.Procedure
applyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setSetter, setSourceLocation, toString
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
Field Details
-
field
-
slotRef
-
staticField
-
-
Constructor Details
-
SlotGet
-
SlotGet
-
-
Method Details
-
field
-
staticField
-
apply2
- Specified by:
apply2
in classProcedure2
-
getSlotValue
public static Object getSlotValue(boolean isStatic, Object obj, String name, String fname, String getName, String isName, Language language) The actual gets of finding the field value. The compiler emits calls to this method if the field name is literal but the actual field is not known at compile time. This speeds lookup a bit. If fname equals "length" or "class", it is assumed to be interned. -
setN
-
set2
-
lookupMember
Get a named property - field or member class or 'get' accessor method.- Parameters:
clas
- the class type declaring the property.name
- the source (unmangled) name of the property.
-
compile
- Specified by:
compile
in interfaceInlineable
-
getSetter
-
makeGetField
Convenience method to make an Expression that gets the value of a field.- Parameters:
value
- evaluates to object that has the named fieldfieldName
- name of field in value- Returns:
- expression that get the name field from value
-