コード例 #1
0
 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;
 }
コード例 #2
0
 /**
  * Adds the annotation to the internal target list if a match is found.
  *
  * @param node the node to be processed
  */
 public void visitAnnotations(AnnotatedNode node) {
   super.visitAnnotations(node);
   for (AnnotationNode annotation : node.getAnnotations()) {
     if (transforms.containsKey(annotation)) {
       targetNodes.add(new ASTNode[] {annotation, node});
     }
   }
 }