AnnotationCollector, AnnotationCollectorTransform#visit(AnnotationNode, AnnotationNode, AnnotatedNode, SourceUnit)
| Modifier and Type | Class and Description |
|---|---|
| public static class | AnnotationCollectorTransform.ClassChanger
Class used by |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addError(String
the message message, ASTNode the node for the error report node, SourceUnit the source unit for the error report source)Adds a new syntax error to the source unit and then continues. |
| private static List | |
| private static void | |
| private static void | |
| private static List | |
| private static ClassNode | |
| private static List | |
| protected List | Returns: a list of string constantsthe node containing the value member with the list collector, AnnotationNode aliasAnnotationUsage, SourceUnit the source unit for error reporting source)Returns a list of AnnotationNodes for the value attribute of the given AnnotationNode. |
| private static List | |
| private static List | |
| private List | getTargetListFromValue(AnnotationNode collector, AnnotationNode aliasAnnotationUsage, SourceUnit source)
|
| private static Expression | |
| private static List | |
| public List | Returns: list of the new AnnotationNodesreference to the annotation with collector, AnnotationNode AnnotationCollectorreference to the place of usage of the alias aliasAnnotationUsage, AnnotatedNode reference to the node that has been annotated by the alias aliasAnnotated, SourceUnit source unit for error reporting source)Implementation method of the alias annotation processor. |
| AnnotationCollectorTransform | back to summary |
|---|---|
| public AnnotationCollectorTransform() | |
| addError | back to summary |
|---|---|
| protected void addError(String message, ASTNode node, SourceUnit source) Adds a new syntax error to the source unit and then continues.
| |
| copy | back to summary |
|---|---|
| private static List | |
| copyMembers | back to summary |
|---|---|
| private static void copyMembers(final AnnotationNode from, final AnnotationNode to) | |
| copyMembers | back to summary |
|---|---|
| private static void copyMembers(final Map<String, Expression> members, final AnnotationNode to) | |
| getMeta | back to summary |
|---|---|
| private static List | |
| getSerializeClass | back to summary |
|---|---|
| private static ClassNode getSerializeClass(final ClassNode alias) | |
| getStoredTargetList | back to summary |
|---|---|
| private static List | |
| getTargetAnnotationList | back to summary |
|---|---|
| protected List Returns a list of AnnotationNodes for the value attribute of the given AnnotationNode.
| |
| getTargetListFromAnnotations | back to summary |
|---|---|
| private static List | |
| getTargetListFromClass | back to summary |
|---|---|
| private static List | |
| getTargetListFromValue | back to summary |
|---|---|
| private List | |
| makeExpression | back to summary |
|---|---|
| private static Expression makeExpression(final Object o) | |
| makeListOfAnnotations | back to summary |
|---|---|
| private static List | |
| visit | back to summary |
|---|---|
| public List Implementation method of the alias annotation processor. This method will get the list of annotations we aliased from the collector and adds it to aliasAnnotationUsage. The method will also map all members from aliasAnnotationUsage to the aliased nodes. Should a member stay unmapped, we will ad an error. Further processing of those members is done by the annotations.
| |
org.codehaus.groovy.control.CompilationUnit to transform the alias class
into what is needed by the compiler. This means removing invalid
modifiers, interfaces and superclasses, as well as adding a static
value method returning our serialized version of the data for processing
from a pre-compiled state. By doing this the old annotations will be
removed as well
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Expression | |
| private Expression | |
| public void | transformClass(ClassNode cn)
Method to transform the given ClassNode, if it is annotated with
|
| ClassChanger | back to summary |
|---|---|
| public ClassChanger() | |
| serialize | back to summary |
|---|---|
| private Expression serialize(Expression e) | |
| serialize | back to summary |
|---|---|
| private Expression serialize(AnnotationNode an) | |
| transformClass | back to summary |
|---|---|
| public void transformClass(ClassNode cn) Method to transform the given ClassNode, if it is annotated with
| |