@GroovyASTTransformation(phase = CompilePhase.CONVERSION)
public class DelegateASTStubber
extends AbstractASTTransformation
Joint-compilation stubber for Delegate. Walks the delegate type with the same enumeration and filtering rules as the full transform — sharing helpers from DelegateASTTransformation — and emits placeholder methods on the owner so Java consumers can call the delegated surface against the joint-compilation stub.
The stub surface is a strict subset of the runtime: the
stubber honours interfaces, deprecated,
includes/excludes, includeTypes/excludeTypes,
and allNames the same way the runtime does, so no method appears
on the stub that the full transform won't add at runtime.
Member-body content is a default-value placeholder; the full transform
at CANONICALIZATION discards stubber-tagged methods first, then installs
its real this.delegate.method(args) bodies.
Boundary. When the delegate type is in the same compilation unit and gains methods from another transform that runs after CONVERSION (or another CONVERSION-phase stubber that hasn't run yet — e.g. the delegate type is declared after the owner in source), those methods are not visible to the stubber and not delegated in the stub. The runtime still produces the full surface; the stub remains a subset.
| Fields inherited from class | Fields |
|---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
visit(ASTNode[] nodes, SourceUnit source) |