gnu.kawa.reflect

Class Invoke

public class Invoke extends ProcedureN implements CanInline

Field Summary
static Invokeinvoke
static InvokeinvokeSpecial
static InvokeinvokeStatic
static Invokemake
Constructor Summary
Invoke(String name, char kind)
Invoke(String name, char kind, Language language)
Method Summary
voidapply(CallContext ctx)
ObjectapplyN(Object[] args)
static intcheckKnownClass(Type type, Compilation comp)
Check if class exists.
protected PrimProcedure[]getMethods(ObjectType ctype, String mname, ClassType caller)
static PrimProceduregetStaticMethod(ClassType type, String name, Expression[] args)
Expressioninline(ApplyExp exp, ExpWalker walker)
static ApplyExpinlineClassName(ApplyExp exp, int carg, InlineCalls walker)
Resolve class specifier to ClassType at inline time.
static ObjectinvokeStatic$V(Object[] args)
static Objectinvoke$V(Object[] args)
protected MethodProclookupMethods(ObjectType dtype, Object name)
static ApplyExpmakeInvokeStatic(ClassType type, String name, Expression[] args)
Return an ApplyExp that will call a method with given arguments.
static Objectmake$V(Object[] args)
intnumArgs()

Field Detail

invoke

public static final Invoke invoke

invokeSpecial

public static final Invoke invokeSpecial

invokeStatic

public static final Invoke invokeStatic

make

public static final Invoke make

Constructor Detail

Invoke

public Invoke(String name, char kind)

Invoke

public Invoke(String name, char kind, Language language)

Method Detail

apply

public void apply(CallContext ctx)

applyN

public Object applyN(Object[] args)

checkKnownClass

public static int checkKnownClass(Type type, Compilation comp)
Check if class exists.

Returns: 1 if class actually exists; -1 is class should exist, but doesn't; and 0 otherwise.

getMethods

protected PrimProcedure[] getMethods(ObjectType ctype, String mname, ClassType caller)

getStaticMethod

public static PrimProcedure getStaticMethod(ClassType type, String name, Expression[] args)

inline

public Expression inline(ApplyExp exp, ExpWalker walker)

inlineClassName

public static ApplyExp inlineClassName(ApplyExp exp, int carg, InlineCalls walker)
Resolve class specifier to ClassType at inline time. This is an optimization to avoid having a module-level binding created for the class name.

invokeStatic$V

public static Object invokeStatic$V(Object[] args)

invoke$V

public static Object invoke$V(Object[] args)

lookupMethods

protected MethodProc lookupMethods(ObjectType dtype, Object name)

makeInvokeStatic

public static ApplyExp makeInvokeStatic(ClassType type, String name, Expression[] args)
Return an ApplyExp that will call a method with given arguments.

Parameters: type the class containing the method we want to call. name the name of the method we want to call args the arguments to the call

Returns: an ApplyExp representing the call

make$V

public static Object make$V(Object[] args)

numArgs

public int numArgs()