Package org.codehaus.groovy.classgen.asm
Class InvocationWriter
java.lang.Object
org.codehaus.groovy.classgen.asm.InvocationWriter
- Direct Known Subclasses:
InvokeDynamicWriter
,StaticInvocationWriter
-
Field Summary
Modifier and TypeFieldDescriptionstatic final MethodCaller
protected final WriterController
static final MethodCaller
static final MethodCallerMultiAdapter
static final MethodCallerMultiAdapter
static final MethodCallerMultiAdapter
static final MethodCallerMultiAdapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
castToNonPrimitiveIfNecessary
(ClassNode sourceType, ClassNode targetType) Converts sourceType to a non-primitive by using Groovy casting.void
protected void
finnishConstructorCall
(ConstructorNode cn, String ownerDescriptor, int argsToRemove) protected String
getMethodName
(Expression message) protected void
loadArguments
(List<Expression> arguments, Parameter[] parameters) static ArgumentListExpression
makeArgumentList
(Expression arguments) protected boolean
makeCachedCall
(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis, boolean containsSpreadExpression) protected void
makeCall
(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis) void
makeCall
(Expression origin, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis) protected boolean
makeClassForNameCall
(Expression origin, Expression receiver, Expression message, Expression arguments) if Class.forName(x) is recognized, make a direct method callprotected boolean
makeDirectCall
(Expression origin, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean implicitThis, boolean containsSpreadExpression) final void
makeSingleArgumentCall
(Expression receiver, String message, Expression arguments) void
makeSingleArgumentCall
(Expression receiver, String message, Expression arguments, boolean safe) protected void
makeUncachedCall
(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis, boolean containsSpreadExpression) protected String
protected boolean
protected boolean
writeDirectMethodCall
(MethodNode target, boolean implicitThis, Expression receiver, TupleExpression args) void
void
void
protected void
void
-
Field Details
-
invokeMethodOnCurrent
-
invokeMethodOnSuper
-
invokeMethod
-
invokeStaticMethod
-
invokeClosureMethod
-
castToVargsArray
-
controller
-
-
Constructor Details
-
InvocationWriter
-
-
Method Details
-
makeCall
public void makeCall(Expression origin, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis) -
makeCall
protected void makeCall(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis) -
writeDirectMethodCall
protected boolean writeDirectMethodCall(MethodNode target, boolean implicitThis, Expression receiver, TupleExpression args) -
loadArguments
-
makeDirectCall
protected boolean makeDirectCall(Expression origin, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean implicitThis, boolean containsSpreadExpression) -
makeCachedCall
protected boolean makeCachedCall(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis, boolean containsSpreadExpression) -
makeUncachedCall
protected void makeUncachedCall(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis, boolean containsSpreadExpression) -
makeClassForNameCall
protected boolean makeClassForNameCall(Expression origin, Expression receiver, Expression message, Expression arguments) if Class.forName(x) is recognized, make a direct method call -
makeArgumentList
-
getMethodName
-
writeInvokeMethod
-
writeInvokeStaticMethod
-
writeInvokeConstructor
-
prepareConstructorCall
-
finnishConstructorCall
-
writeNormalConstructorCall
-
writeAICCall
-
makeSingleArgumentCall
-
makeSingleArgumentCall
public void makeSingleArgumentCall(Expression receiver, String message, Expression arguments, boolean safe) -
writeSpecialConstructorCall
-
castToNonPrimitiveIfNecessary
Converts sourceType to a non-primitive by using Groovy casting. sourceType might be a primitive This might be done using SBA#castToType -
castNonPrimitiveToBool
-
coerce
-