Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class PackedClosureMetaClass

- org.codehaus.groovy.runtime.metaclass.PackedClosureMetaClass

-     public final class PackedClosureMetaClass
      extends MetaClassImpl

  The stock metaclass for PackedClosure, giving packed closures their own MOP standing (the analog of ClosureMetaClass for generated closure classes, whose per-class metaclasses packed closures deliberately do not have).

  `invokeMethod("call"/"doCall")` dispatches straight to the adapter — a plain virtual call that routes to the hosting class's dispatch tables — with no reflection anywhere on the path, and, matching ClosureMetaClass, without consulting categories for the closure-invocation names (categories have never applied to closure `doCall` dispatch). Each fixed-arity family member class gets its own instance of this metaclass from the registry (a per-class registry can only be per-adapter-class), so class-level metaclass changes affect every packed closure of that member's arity; per-instance `setMetaClass` is honoured as usual — the adapter's dispatch guard routes perturbed instances through the replacement's `invokeMethod`.

  `respondsTo(Object, String, Object[])` is instance-faithful: the fixed-arity family member's `doCall`(s) are erased to `Object` parameters (and `FixedN`'s is varargs), so the answer for the closure-invocation names is additionally filtered by the instance's declared parameter types (which the adapter carries for exactly this purpose). Purely class-level introspection (`pickMethod`, `getMetaMethods`) necessarily reflects the shared adapter class, not any single literal.

  Since:
    6.0.0

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class MetaClassImpl` | `EMPTY_ARGUMENTS, INVOKE_METHOD_METHOD, METHOD_MISSING, PROPERTY_MISSING, STATIC_METHOD_MISSING, STATIC_PROPERTY_MISSING, getPropertyMethod, invokeMethodMethod, isGroovyObject, isMap, metaMethodIndex, registry, setPropertyMethod, theCachedClass, theClass`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `PackedClosureMetaClass(MetaClassRegistry registry, Class theClass)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `invokeMethod(Class sender, Object object, String methodName, Object[] originalArguments, boolean isCallToSuper, boolean fromInsideClass)`
    `` | `public List<MetaMethod>` | `respondsTo(Object obj, String name, Object[] argTypes)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class MetaClassImpl` | `addMetaBeanProperty, addMetaMethod, addMetaMethodToIndex, addNewInstanceMethod, addNewStaticMethod, applyPropertyDescriptors, checkIfGroovyObjectMethod, checkInitalised, chooseConstructor, chooseMethod, chooseNamedArgCompatibleConstructor, clearInvocationCaches, createErrorMessageForAmbiguity, createTransformMetaMethod, doChooseMostSpecificParams, dropMethodCache, dropStaticMethodCache, findMethodInClassHierarchy, findMixinMethod, findOwnMethod, findPropertyInClassHierarchy, getAdditionalMetaMethods, getAttribute, getAttribute, getAttribute, getClassInfo, getClassNode, getEffectiveGetMetaProperty, getMetaMethod, getMetaMethods, getMetaProperty, getMethodWithCaching, getMethodWithCaching, getMethodWithoutCaching, getMethods, getNonClosureOuter, getProperties, getProperty, getProperty, getRegistry, getStaticMetaMethod, getSubclassMetaMethods, getSuperClasses, getTheCachedClass, getTheClass, getVersion, handleMatches, hasCustomInvokeMethod, hasCustomStaticInvokeMethod, hasProperty, incVersion, initialize, invokeConstructor, invokeMethod, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMethod, invokeStaticMissingProperty, isGroovyObject, isInitialized, isModified, isPermissivePropertyAccess, onGetPropertyFoundInHierarchy, onInvokeMethodFoundInHierarchy, onMixinMethodFound, onSetPropertyFoundInHierarchy, onSuperMethodFoundInHierarchy, onSuperPropertyFoundInHierarchy, pickMethod, reinitialize, respondsTo, respondsTo, retrieveConstructor, retrieveConstructor, retrieveStaticMethod, selectConstructorAndTransformArguments, setAttribute, setAttribute, setInitialized, setPermissivePropertyAccess, setProperties, setProperty, setProperty, toString`

- - ### Constructor Detail

    - #### public PackedClosureMetaClass(MetaClassRegistry registry, Class theClass)

  - ### Method Detail

    - #### public Object invokeMethod(Class sender, Object object, String methodName, Object[] originalArguments, boolean isCallToSuper, boolean fromInsideClass)

    - #### public List<MetaMethod> respondsTo(Object obj, String name, Object[] argTypes)