use of org.codehaus.groovy.ast.AnnotatedNode in project groovy by apache.
the class SingletonASTTransformation method visit.
public void visit(ASTNode[] nodes, SourceUnit source) {
init(nodes, source);
AnnotatedNode parent = (AnnotatedNode) nodes[1];
AnnotationNode node = (AnnotationNode) nodes[0];
if (parent instanceof ClassNode) {
ClassNode classNode = (ClassNode) parent;
String propertyName = getMemberStringValue(node, "property", "instance");
boolean isLazy = memberHasValue(node, "lazy", true);
boolean isStrict = !memberHasValue(node, "strict", false);
createField(classNode, propertyName, isLazy, isStrict);
}
}
use of org.codehaus.groovy.ast.AnnotatedNode in project groovy by apache.
the class SortableASTTransformation method visit.
public void visit(ASTNode[] nodes, SourceUnit source) {
init(nodes, source);
AnnotationNode annotation = (AnnotationNode) nodes[0];
AnnotatedNode parent = (AnnotatedNode) nodes[1];
if (parent instanceof ClassNode) {
createSortable(annotation, (ClassNode) parent);
}
}
Aggregations