Package: org.codehaus.groovy.vmplugin.v7

## [Java] Class IndyInterface

- org.codehaus.groovy.vmplugin.v7.IndyInterface

- Bytecode level interface for bootstrap methods used by invokedynamic. This class provides a logging ability by using the boolean system property groovy.indy.logging. Other than that this class contains the interfacing methods with bytecode for invokedynamic as well as some helper methods and classes.

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static enum` | `IndyInterface.CALL_TYPES` | Enum for easy differentiation between call types

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static int` | `GROOVY_OBJECT` |
    `static int` | `IMPLICIT_THIS` |
    `protected static Logger` | `LOG` | Logger
    `protected static boolean` | `LOG_ENABLED` | boolean to indicate if logging for indy is enabled
    `static MethodHandles.Lookup` | `LOOKUP` | LOOKUP constant used for for example unreflect calls
    `static int` | `SAFE_NAVIGATION` | flags for method and property calls
    `static int` | `SPREAD_CALL` |
    `static int` | `THIS_CALL` |
    `static int` | `UNCACHED_CALL` |
    `protected static SwitchPoint` | `switchPoint` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static CallSite` | `bootstrap(Lookup caller, String callType, MethodType type, String name, int flags)` bootstrap method for method calls from Groovy compiled code with indy enabled.
    `` | `static CallSite` | `bootstrap(Lookup caller, String name, MethodType type)` bootstrap method for standard method calls
    `` | `static CallSite` | `bootstrapCurrent(Lookup caller, String name, MethodType type)` bootstrap method for method calls with "this" as receiver
    `` | `static CallSite` | `bootstrapCurrentSafe(Lookup caller, String name, MethodType type)` bootstrap method for method calls with "this" as receiver safe
    `` | `static CallSite` | `bootstrapSafe(Lookup caller, String name, MethodType type)` bootstrap method for null safe standard method calls
    `` | `protected static void` | `invalidateSwitchPoints()` Callback for constant meta class update change
    `` | `protected static MethodHandle` | `makeFallBack(MutableCallSite mc, Class<?> sender, String name, int callID, MethodType type, boolean safeNavigation, boolean thisCall, boolean spreadCall)` Makes a fallback method for an invalidated method selection
    `` | `static Object` | `selectMethod(MutableCallSite callSite, Class sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments)` Core method for indy method selection using runtime types.
    `` | `static CallSite` | `staticArrayAccess(MethodHandles.Lookup lookup, String name, MethodType type)` @since 2.5.0

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static final int GROOVY_OBJECT

    - #### public static final int IMPLICIT_THIS

    - #### protected static final Logger LOG

      Logger

    - #### protected static final boolean LOG_ENABLED

      boolean to indicate if logging for indy is enabled

    - #### public static final MethodHandles.Lookup LOOKUP

      LOOKUP constant used for for example unreflect calls

    - #### public static final int SAFE_NAVIGATION

      flags for method and property calls

    - #### public static final int SPREAD_CALL

    - #### public static final int THIS_CALL

    - #### public static final int UNCACHED_CALL

    - #### protected static SwitchPoint switchPoint

  - ### Method Detail

    - #### public static CallSite bootstrap(Lookup caller, String callType, MethodType type, String name, int flags)

      bootstrap method for method calls from Groovy compiled code with indy enabled. This method gets a flags parameter which uses the following encoding:

      - {
        value:
          #SAFE_NAVIGATION} is the flag value for safe navigation see SAFE_NAVIGATION
      - {@value #THIS_CALL} is the flag value for a call on this see THIS_CALL
      Parameters:
        `caller` - - the caller
        `callType` - - the type of the call
        `type` - - the call site type
        `name` - - the real method name
        `flags` - - call flags
      Returns:
        the produced CallSite
      Since:
        Groovy 2.1.0

    - #### @Deprecated public static CallSite bootstrap(Lookup caller, String name, MethodType type)

      bootstrap method for standard method calls

      deprecated:
        since Groovy 2.1.0

    - #### @Deprecated public static CallSite bootstrapCurrent(Lookup caller, String name, MethodType type)

      bootstrap method for method calls with "this" as receiver

      deprecated:
        since Groovy 2.1.0

    - #### @Deprecated public static CallSite bootstrapCurrentSafe(Lookup caller, String name, MethodType type)

      bootstrap method for method calls with "this" as receiver safe

      deprecated:
        since Groovy 2.1.0

    - #### @Deprecated public static CallSite bootstrapSafe(Lookup caller, String name, MethodType type)

      bootstrap method for null safe standard method calls

      deprecated:
        since Groovy 2.1.0

    - #### protected static void invalidateSwitchPoints()

      Callback for constant meta class update change

    - #### protected static MethodHandle makeFallBack(MutableCallSite mc, Class<?> sender, String name, int callID, MethodType type, boolean safeNavigation, boolean thisCall, boolean spreadCall)

      Makes a fallback method for an invalidated method selection

    - #### public static Object selectMethod(MutableCallSite callSite, Class sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments)

      Core method for indy method selection using runtime types.

    - #### public static CallSite staticArrayAccess(MethodHandles.Lookup lookup, String name, MethodType type)

      Since:
        2.5.0