| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private CompilationUnit | |
| public static final String | |
| private static final ClassNode | |
| private static final ClassNode | |
| public static final String | |
| private SourceUnit |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private static void | copyClassAnnotations(final ClassNode
the trait class node cNode, final ClassNode the helper class node helper)Copies annotation from the trait to the helper, excluding the trait annotation itself. |
| private ClassNode | |
| private static MethodNode | |
| private static ClassNode | |
| private static Parameter | |
| private static List | |
| private static void | |
| private static void | |
| private BlockStatement | |
| private static boolean | |
| private Statement | processBody(final VariableExpression thisObject, final Statement code, final ClassNode trait, final ClassNode traitHelper, final ClassNode fieldHelper, final Collection<String> knownFields)
|
| private void | processField(final FieldNode field, final MethodNode initializer, final MethodNode staticInitializer, final ClassNode fieldHelper, final ClassNode helper, final ClassNode staticFieldHelper, final ClassNode trait, final Set<String> knownFields)
|
| private MethodNode | processMethod(final ClassNode traitClass, final ClassNode traitHelperClass, final MethodNode methodNode, final ClassNode fieldHelper, final Collection<String> knownFields)
|
| private static void | processProperty(final ClassNode cNode, final PropertyNode node)
Mostly copied from the |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | setCompilationUnit(final CompilationUnit unit)
Implements groovy. |
| public void | visit(final ASTNode[]
The ASTnodes when the call was triggered. Element 0 is the AnnotationNode that triggered this
annotation to be activated. Element 1 is the AnnotatedNode decorated, such as a MethodNode or ClassNode. For
global transformations it is usually safe to ignore this parameter. nodes, final SourceUnit The source unit being compiled. The source unit may contain several classes. For global transformations,
information about the AST can be retrieved from this object. source)Implements org. |
| compilationUnit | back to summary |
|---|---|
| private CompilationUnit compilationUnit | |
| DO_DYNAMIC | back to summary |
|---|---|
| public static final String DO_DYNAMIC | |
| INVOKERHELPER_CLASSNODE | back to summary |
|---|---|
| private static final ClassNode INVOKERHELPER_CLASSNODE | |
| OVERRIDE_CLASSNODE | back to summary |
|---|---|
| private static final ClassNode OVERRIDE_CLASSNODE | |
| POST_TYPECHECKING_REPLACEMENT | back to summary |
|---|---|
| public static final String POST_TYPECHECKING_REPLACEMENT | |
| sourceUnit | back to summary |
|---|---|
| private SourceUnit sourceUnit Hides org. | |
| TraitASTTransformation | back to summary |
|---|---|
| public TraitASTTransformation() | |
| checkExtendsClause | back to summary |
|---|---|
| private void checkExtendsClause(final ClassNode cNode) | |
| checkInnerClasses | back to summary |
|---|---|
| private void checkInnerClasses(final ClassNode cNode) | |
| checkNoConstructor | back to summary |
|---|---|
| private void checkNoConstructor(final ClassNode cNode) | |
| copyClassAnnotations | back to summary |
|---|---|
| private static void copyClassAnnotations(final ClassNode cNode, final ClassNode helper) Copies annotation from the trait to the helper, excluding the trait annotation itself. | |
| createHelperClass | back to summary |
|---|---|
| private ClassNode createHelperClass(final ClassNode cNode) | |
| createInitMethod | back to summary |
|---|---|
| private static MethodNode createInitMethod(final boolean isStatic, final ClassNode cNode, final ClassNode helper) | |
| createReceiverType | back to summary |
|---|---|
| private static ClassNode createReceiverType(final boolean isStatic, final ClassNode rawType) | |
| createSelfParameter | back to summary |
|---|---|
| private static Parameter createSelfParameter(final ClassNode traitClass, boolean isStatic) | |
| filterAnnotations | back to summary |
|---|---|
| private static List | |
| generateMethodsWithDefaultArgs | back to summary |
|---|---|
| private static void generateMethodsWithDefaultArgs(final ClassNode cNode) | |
| generatePropertyMethods | back to summary |
|---|---|
| private static void generatePropertyMethods(final ClassNode cNode) | |
| getBlockStatement | back to summary |
|---|---|
| private BlockStatement getBlockStatement(final MethodNode targetMethod, final Statement code) | |
| methodNeedsReplacement | back to summary |
|---|---|
| private static boolean methodNeedsReplacement(final ClassNode cNode, final MethodNode mNode) | |
| processBody | back to summary |
|---|---|
| private Statement processBody(final VariableExpression thisObject, final Statement code, final ClassNode trait, final ClassNode traitHelper, final ClassNode fieldHelper, final Collection<String> knownFields) | |
| processField | back to summary |
|---|---|
| private void processField(final FieldNode field, final MethodNode initializer, final MethodNode staticInitializer, final ClassNode fieldHelper, final ClassNode helper, final ClassNode staticFieldHelper, final ClassNode trait, final Set<String> knownFields) | |
| processMethod | back to summary |
|---|---|
| private MethodNode processMethod(final ClassNode traitClass, final ClassNode traitHelperClass, final MethodNode methodNode, final ClassNode fieldHelper, final Collection<String> knownFields) | |
| processProperty | back to summary |
|---|---|
| private static void processProperty(final ClassNode cNode, final PropertyNode node) Mostly copied from the | |
| registerASTTransformations | back to summary |
|---|---|
| private void registerASTTransformations(final ClassNode helper) | |
| replaceExtendsByImplements | back to summary |
|---|---|
| private void replaceExtendsByImplements(final ClassNode cNode) | |
| resolveHelperClassIfNecessary | back to summary |
|---|---|
| private void resolveHelperClassIfNecessary(final ClassNode helperClassNode) | |
| resolveScope | back to summary |
|---|---|
| private void resolveScope(final ClassNode cNode) | |
| setCompilationUnit | back to summary |
|---|---|
| public void setCompilationUnit(final CompilationUnit unit) Implements groovy.
| |
| visit | back to summary |
|---|---|
| public void visit(final ASTNode[] nodes, final SourceUnit source) Implements org. Doc from org. The method is invoked when an AST Transformation is active. For local transformations, it is invoked once each time the local annotation is encountered. For global transformations, it is invoked once for every source unit, which is typically a source file.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addDefaultParameterMethods(final ClassNode node)
Overrides org. |
| DefaultArgsMethodsAdder | back to summary |
|---|---|
| private DefaultArgsMethodsAdder() | |
| addDefaultParameterMethods | back to summary |
|---|---|
| public void addDefaultParameterMethods(final ClassNode node) Overrides org. Doc from org. Creates a new method for each combination of default parameter expressions.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SourceUnit |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected SourceUnit | |
| public Expression | transform(final Expression exp)
Overrides org. Implements org. |
| sourceUnit | back to summary |
|---|---|
| private final SourceUnit sourceUnit | |
| PostTypeCheckingExpressionReplacer | back to summary |
|---|---|
| pack-priv PostTypeCheckingExpressionReplacer(final SourceUnit sourceUnit) | |
| getSourceUnit | back to summary |
|---|---|
| protected SourceUnit getSourceUnit() Implements abstract org.
| |
| transform | back to summary |
|---|---|
| public Expression transform(final Expression exp) Overrides org. Implements org. Doc from org. Transforms the given expression into another expression
| |