Class PackedClosure.Fixed0

All Implemented Interfaces:
GroovyCallable<Object>, GroovyObject, Serializable, Cloneable, Runnable, Callable<Object>, GeneratedClosure
Enclosing class:
PackedClosure

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 (PackedClosure.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 PackedClosure.dispatchAll(java.lang.Object[])) 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.
See Also: