public enum PackStrategy
extends Enum
The compilation strategy the GEP-27 capability analysis selects for a closure literal: keep today's
per-closure class, or pack the closure by hoisting its body to a method on the enclosing class behind
a shared PackedClosure adapter. The GEP-27 lattice also foresees a metafactory strategy
(functional-interface targets) and object elision, but those are separate, later work and are not
represented here yet.
| Enum constant | Description |
|---|---|
FULL_CLASS |
S0 — generate the per-closure class (today's behaviour); preserves all Closure capabilities. |
PACKED_ADAPTER |
S1 — hoist the body to a method on the enclosing class behind a shared PackedClosure adapter. |
S0 — generate the per-closure class (today's behaviour); preserves all Closure capabilities.
S1 — hoist the body to a method on the enclosing class behind a shared PackedClosure adapter.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.