org.codehaus.groovy.classgen.asm.indy

## Class InvokeDynamicWriter

- java.lang.Object
- - org.codehaus.groovy.classgen.asm.InvocationWriter
  - - org.codehaus.groovy.classgen.asm.indy.InvokeDynamicWriter

-     public class InvokeDynamicWriter
      extends InvocationWriter

  This Writer is used to generate the call invocation byte codes for usage by invokedynamic.
  Author:
    Jochen "blackdrag" Theodorou

- - ### Field Summary

    - ### Fields inherited from class org.codehaus.groovy.classgen.asm.InvocationWriter

      `castToVargsArray, invokeClosureMethod, invokeMethod, invokeMethodOnCurrent, invokeMethodOnSuper, invokeStaticMethod`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvokeDynamicWriter(WriterController wc)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `castNonPrimitiveToBool(ClassNode sourceType)`
    `void` | `castToNonPrimitiveIfNecessary(ClassNode sourceType, ClassNode targetType)` This converts sourceType to a non primitive by using Groovy casting.
    `void` | `coerce(ClassNode from, ClassNode target)`
    `protected boolean` | `makeCachedCall(Expression origin, ClassExpression sender, Expression receiver, Expression message, Expression arguments, MethodCallerMultiAdapter adapter, boolean safe, boolean spreadSafe, boolean implicitThis, boolean containsSpreadExpression)`
    `void` | `makeSingleArgumentCall(Expression receiver, java.lang.String message, Expression arguments)`
    `protected void` | `writeGetProperty(Expression receiver, java.lang.String propertyName, boolean safe, boolean implicitThis, boolean groovyObject)`
    `protected void` | `writeNormalConstructorCall(ConstructorCallExpression call)`

    - ### Methods inherited from class org.codehaus.groovy.classgen.asm.InvocationWriter

      `finnishConstructorCall, getMethodName, loadArguments, makeArgumentList, makeCall, makeCall, makeClassForNameCall, makeDirectCall, makeUncachedCall, prepareConstructorCall, writeAICCall, writeDirectMethodCall, writeInvokeConstructor, writeInvokeMethod, writeInvokeStaticMethod, writeSpecialConstructorCall`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InvokeDynamicWriter

          public InvokeDynamicWriter(WriterController wc)

  - ### Method Detail

    - #### makeCachedCall

          protected boolean makeCachedCall(Expression origin,
                                           ClassExpression sender,
                                           Expression receiver,
                                           Expression message,
                                           Expression arguments,
                                           MethodCallerMultiAdapter adapter,
                                           boolean safe,
                                           boolean spreadSafe,
                                           boolean implicitThis,
                                           boolean containsSpreadExpression)

      Overrides:
        `makeCachedCall` in class `InvocationWriter`

    - #### makeSingleArgumentCall

          public void makeSingleArgumentCall(Expression receiver,
                                             java.lang.String message,
                                             Expression arguments)

      Overrides:
        `makeSingleArgumentCall` in class `InvocationWriter`

    - #### writeGetProperty

          protected void writeGetProperty(Expression receiver,
                                          java.lang.String propertyName,
                                          boolean safe,
                                          boolean implicitThis,
                                          boolean groovyObject)

    - #### writeNormalConstructorCall

          protected void writeNormalConstructorCall(ConstructorCallExpression call)

      Overrides:
        `writeNormalConstructorCall` in class `InvocationWriter`

    - #### coerce

          public void coerce(ClassNode from,
                             ClassNode target)

      Overrides:
        `coerce` in class `InvocationWriter`

    - #### castToNonPrimitiveIfNecessary

          public void castToNonPrimitiveIfNecessary(ClassNode sourceType,
                                                    ClassNode targetType)

      Description copied from class: `InvocationWriter`
      This converts sourceType to a non primitive by using Groovy casting. sourceType might be a primitive This might be done using SBA#castToType
      Overrides:
        `castToNonPrimitiveIfNecessary` in class `InvocationWriter`

    - #### castNonPrimitiveToBool

          public void castNonPrimitiveToBool(ClassNode sourceType)

      Overrides:
        `castNonPrimitiveToBool` in class `InvocationWriter`