public class BuilderASTStubber
extends AbstractASTTransformation
Joint-compilation stubber for Builder, covering the two most common shapes:
build()
method, plus a static Foo.builder() factory on the
buildee.prefix: emits
chained Foo prefixName(T value) setters on the buildee
itself. Skipped silently for the default prefix = "set"
because the stubber's Foo setX(value) would clash with
the void setX(value) that the stub generator's Verifier
sub-pass also emits for properties — Java doesn't allow two
methods with the same name and parameters but different return
types.Other strategies are out of scope for this spike pass:
Method/constructor targets, the forClass attribute, and
includeSuperProperties are also out of scope. The stubber walks
directly-declared properties only, mirroring the same Tier 1 limitation
other property-walking stubbers carry.
| Fields inherited from class | Fields |
|---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
visit(ASTNode[] nodes, SourceUnit source) |