public static final class PackedClosure.Fixed0
extends PackedClosure
implements GeneratedClosure
Fixed-arity members of the adapter family: the compiler instantiates the member matching the
literal's declared parameter count (FixedN serves higher arities), so a packed
closure's arity is visible to class-level introspection exactly as on a generated closure
class — notably MetaClassHelper's SAM-overload disambiguation, which reflects the
argument class's declared doCall and cannot consult the instance. Each
member declares ONLY the arity-matched doCall(s) (delegating to dispatchAll)
and carries the GeneratedClosure marker that introspection keys on, so MOP method
selection sees exactly the signatures a generated closure class would declare — in
particular, no varargs doCall(Object[]) that would exact-match a single
Object[] argument and spread it. The hot entry points remain the base call
lanes, which do not allocate for these shapes.
| Fields inherited from class | Fields |
|---|---|
class Closure |
DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, OWNER_FIRST, OWNER_ONLY, TO_SELF, maximumNumberOfParameters, parameterTypes |
| Methods inherited from class | Name |
|---|---|
class PackedClosure |
call, call, create, dispatchAll, setDelegate, setResolveStrategy, toString |
class Closure |
andThen, andThenSelf, andThenSelf, asWritable, call, call, call, checkForReferenceCycle, clone, compose, composeSelf, composeSelf, curry, curry, dehydrate, getDelegate, getDirective, getMaximumNumberOfParameters, getOwner, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, mopUnperturbed, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setMetaClass, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampoline |
class GroovyObjectSupport |
getMetaClass, setMetaClass |
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.