Package: org.codehaus.groovy.vmplugin.v16

## [Java] Class Java16

- org.codehaus.groovy.vmplugin.v16.Java16

-     @Deprecated(since = "6.0.0", forRemoval = true)
      public class Java16
      extends Java10

  deprecated:
    Use Java17 instead. Groovy 6.0 requires JDK 17+.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `getInvokeSpecialHandle(Method method, Object receiver)` Returns a handle for invoking the supplied method, including proxy default methods.
    `` | `public List<String>` | `getRecordComponentNames(Class<?> maybeRecord)` Returns the component names declared by a record class.
    `` | `public int` | `getVersion()` Returns the Java feature version handled by this plugin.
    `` | `public Object` | `invokeHandle(Object handle, Object[] args)` Invokes a handle produced by getInvokeSpecialHandle(Method, Object).
    `` | `protected void` | `makeRecordComponents(CompileUnit cu, ClassNode cn, Class<?> c)` Adds record component metadata when the runtime class is a record.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Java10` | `getPluginDefaultGroovyMethods, getVersion`
    `class Java9` | `checkAccessible, checkCanSetAccessible, getDefaultImportClasses, getPluginDefaultGroovyMethods, getVersion, newLookup, transformMetaMethod, trySetAccessible`
    `class Java8` | `applyTypeAnnotations, checkAccessible, checkCanSetAccessible, configureAnnotation, configureClassNode, configureTypeVariableDefinition, configureTypeVariableReference, fillParameterNames, getInvokeSpecialHandle, getPluginDefaultGroovyMethods, getPluginStaticGroovyMethods, getValue, getVersion, invalidateCallSites, invokeHandle, makeClassNode, makeRecordComponents, newLookup, of, setAdditionalClassInformation, toAnnotationNode, transformMetaMethod, transformMetaMethod, trySetAccessible`

- - ### Method Detail

    - #### public Object getInvokeSpecialHandle(Method method, Object receiver)

      Returns a handle for invoking the supplied method, including proxy default methods.

      Parameters:
        `method` - the method to invoke
        `receiver` - the bound receiver
      Returns:
        a bound invocation handle or a wrapped failure

    - #### @Incubating
      public List<String> getRecordComponentNames(Class<?> maybeRecord)

      Returns the component names declared by a record class.

      Parameters:
        `maybeRecord` - the class to inspect
      Returns:
        the record component names, or the inherited fallback result

    - #### public int getVersion()

      Returns the Java feature version handled by this plugin.

      Returns:
        `16`

    - #### public Object invokeHandle(Object handle, Object[] args)

      Invokes a handle produced by getInvokeSpecialHandle(Method, Object).

      throws:
        Throwable if invocation fails
      Parameters:
        `handle` - the handle or deferred failure to invoke
        `args` - the invocation arguments
      Returns:
        the invocation result

    - #### protected void makeRecordComponents(CompileUnit cu, ClassNode cn, Class<?> c)

      Adds record component metadata when the runtime class is a record.

      Parameters:
        `cu` - the owning compile unit
        `cn` - the class node to update
        `c` - the runtime class