public static boolean isStaticallyCompiled(AnnotatedNode node) { if (node.getNodeMetaData(STATIC_COMPILE_NODE) != null) return (Boolean) node.getNodeMetaData(STATIC_COMPILE_NODE); if (node instanceof MethodNode) { return isStaticallyCompiled(node.getDeclaringClass()); } if (node instanceof InnerClassNode) { return isStaticallyCompiled(((InnerClassNode) node).getOuterClass()); } return false; }
private void setAnnotationMetaData(Annotation[] annotations, AnnotatedNode an) { for (Annotation annotation : annotations) { AnnotationNode node = new AnnotationNode(ClassHelper.make(annotation.annotationType())); configureAnnotation(node, annotation); an.addAnnotation(node); } }
public void visitAnnotations(AnnotatedNode node) { List<AnnotationNode> annotations = node.getAnnotations(); if (annotations.isEmpty()) return; for (AnnotationNode an : annotations) { // skip built-in properties if (an.isBuiltIn()) continue; for (Map.Entry<String, Expression> member : an.getMembers().entrySet()) { Expression annMemberValue = member.getValue(); annMemberValue.visit(this); } } }