@GroovyASTTransformation(phase = CompilePhase.CONVERSION)
public class ToStringASTStubber
extends AbstractASTTransformation
Joint-compilation stubber for ToString. Adds a placeholder
toString() so the @ToString-generated override is visible in the
stub even though Object already provides one. Useful for Java code that
does super.toString() chaining or for tooling that examines
declared (rather than inherited) methods.
The placeholder body returns an empty string. The full ToStringASTTransformation at CANONICALIZATION recognises the stubber tag and replaces the body with the real implementation.
| Fields inherited from class | Fields |
|---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
visit(ASTNode[] nodes, SourceUnit source) |