public class TraitASTTransformation
extends AbstractASTTransformation
implements CompilationUnitAware
Handles generation of code for the traits (trait keyword is equivalent to using the
| Modifiers | Name | Description |
|---|---|---|
static String |
DO_DYNAMIC |
Metadata key that marks trait-generated calls requiring dynamic dispatch. |
static String |
POST_TYPECHECKING_REPLACEMENT |
Metadata key that stores an expression replacement to apply after type checking. |
| Fields inherited from class | Fields |
|---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
setCompilationUnit(CompilationUnit unit)Stores the compilation unit so generated helper classes can register follow-up transformations. |
|
public void |
visit(ASTNode[] nodes, SourceUnit source)Rewrites a trait declaration into the interface and helper classes used during compilation. |
Metadata key that marks trait-generated calls requiring dynamic dispatch.
Metadata key that stores an expression replacement to apply after type checking.
Stores the compilation unit so generated helper classes can register follow-up transformations.
unit - the active compilation unitRewrites a trait declaration into the interface and helper classes used during compilation.
nodes - the annotation and annotated nodes participating in the transformationsource - the source unit being transformed