gnu.kawa.reflect
Class SlotGet
java.lang.Object
gnu.mapping.Procedure
gnu.mapping.Procedure2
gnu.kawa.reflect.SlotGet
- All Implemented Interfaces:
- CanInline, Inlineable, HasSetter, Named
public class SlotGet
- extends Procedure2
- implements HasSetter, CanInline, Inlineable
Constructor Summary |
SlotGet(java.lang.String name,
boolean isStatic)
|
SlotGet(java.lang.String name,
boolean isStatic,
Procedure setter)
|
Methods inherited from class gnu.mapping.Procedure |
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getName, getProperty, getSymbol, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, removeProperty, set0, set1, setName, setProperty, setProperty, setSetter, setSymbol, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
field
public static final SlotGet field
staticField
public static final SlotGet staticField
SlotGet
public SlotGet(java.lang.String name,
boolean isStatic)
SlotGet
public SlotGet(java.lang.String name,
boolean isStatic,
Procedure setter)
field
public static java.lang.Object field(java.lang.Object obj,
java.lang.String fname)
staticField
public static java.lang.Object staticField(java.lang.Object obj,
java.lang.String fname)
apply2
public java.lang.Object apply2(java.lang.Object obj,
java.lang.Object name)
- Specified by:
apply2
in class Procedure2
setN
public void setN(java.lang.Object[] args)
- Overrides:
setN
in class Procedure
set2
public void set2(java.lang.Object obj,
java.lang.Object name,
java.lang.Object value)
inline
public Expression inline(ApplyExp exp,
ExpWalker walker)
- Description copied from interface:
CanInline
- Inline an application of this Procedure and return result.
Can return original expression.
- Specified by:
inline
in interface CanInline
compile
public void compile(ApplyExp exp,
Compilation comp,
Target target)
- Specified by:
compile
in interface Inlineable
getReturnType
public Type getReturnType(Expression[] args)
- Specified by:
getReturnType
in interface Inlineable
getSetter
public Procedure getSetter()
- Specified by:
getSetter
in interface HasSetter
- Overrides:
getSetter
in class Procedure
makeGetField
public static Expression makeGetField(Expression value,
java.lang.String fieldName)
- 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