GroovyASTTransformation. Each such annotation is added.
This visitor is only intended to be executed once, during the
CompilePhase#SEMANTIC_ANALYSIS phase of compilation.
| Modifier and Type | Field and Description |
|---|---|
| private ClassNode | |
| private final SourceUnit | |
| private final GroovyClassLoader |
| Access | Constructor and Description |
|---|---|
| public | ASTTransformationCollectorCodeVisitor(final SourceUnit source, final GroovyClassLoader transformLoader)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | addTransformsToClassNode(final AnnotationNode annotation)
Determines if given annotation specifies an AST transformation and if so, adds it to the current class. |
| private static void | deleteExisting(final boolean mergeParams, final Map<Integer, List<AnnotationNode>> existing, final List<AnnotationNode> replacements)
|
| private static void | deleteReplacement(final boolean mergeParams, final Map<Integer, List<AnnotationNode>> existing, final List<AnnotationNode> replacements)
|
| private void | findCollectedAnnotations(final AnnotationNode alias, final AnnotatedNode origin, final Integer index, final Map<Integer, AnnotationCollectorMode> modes, final Map<Integer, List<AnnotationNode>> existing, final Map<Integer, List<AnnotationNode>> replacements)
|
| protected SourceUnit | |
| private static Annotation | |
| private Class | |
| private static void | mergeCollectedAnnotations(final AnnotationCollectorMode mode, final Map<Integer, List<AnnotationNode>> existing, final List<AnnotationNode> replacements)
|
| private static void | |
| private void | |
| public void | visitAnnotations(final AnnotatedNode node)
Overrides org. |
| public void | visitClass(final ClassNode classNode)
Overrides org. Implements org. |
| classNode | back to summary |
|---|---|
| private ClassNode classNode | |
| source | back to summary |
|---|---|
| private final SourceUnit source | |
| transformLoader | back to summary |
|---|---|
| private final GroovyClassLoader transformLoader | |
| ASTTransformationCollectorCodeVisitor | back to summary |
|---|---|
| public ASTTransformationCollectorCodeVisitor(final SourceUnit source, final GroovyClassLoader transformLoader) | |
| addTransformsToClassNode | back to summary |
|---|---|
| private void addTransformsToClassNode(final AnnotationNode annotation) Determines if given annotation specifies an AST transformation and if so, adds it to the current class. | |
| deleteExisting | back to summary |
|---|---|
| private static void deleteExisting(final boolean mergeParams, final Map<Integer, List<AnnotationNode>> existing, final List<AnnotationNode> replacements) | |
| deleteReplacement | back to summary |
|---|---|
| private static void deleteReplacement(final boolean mergeParams, final Map<Integer, List<AnnotationNode>> existing, final List<AnnotationNode> replacements) | |
| findCollectedAnnotations | back to summary |
|---|---|
| private void findCollectedAnnotations(final AnnotationNode alias, final AnnotatedNode origin, final Integer index, final Map<Integer, AnnotationCollectorMode> modes, final Map<Integer, List<AnnotationNode>> existing, final Map<Integer, List<AnnotationNode>> replacements) | |
| getSourceUnit | back to summary |
|---|---|
| protected SourceUnit getSourceUnit() Implements abstract org.
| |
| getTransformClassAnnotation | back to summary |
|---|---|
| private static Annotation getTransformClassAnnotation(final ClassNode annotationType) | |
| loadTransformClass | back to summary |
|---|---|
| private Class | |
| mergeCollectedAnnotations | back to summary |
|---|---|
| private static void mergeCollectedAnnotations(final AnnotationCollectorMode mode, final Map<Integer, List<AnnotationNode>> existing, final List<AnnotationNode> replacements) | |
| mergeParameters | back to summary |
|---|---|
| private static void mergeParameters(final AnnotationNode to, final AnnotationNode from) | |
| verifyAndAddTransform | back to summary |
|---|---|
private void verifyAndAddTransform(final AnnotationNode annotation, final Class<?> transformClass)
| |
| visitAnnotations | back to summary |
|---|---|
| public void visitAnnotations(final AnnotatedNode node) Overrides org.
| |
| visitClass | back to summary |
|---|---|
| public void visitClass(final ClassNode classNode) Overrides org. Implements org. Doc from org. Visit a ClassNode.
| |