diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeAnnotationMirror.java @ 9779:0e4db5ee0695

Added support for the kind field in @NodeInfo for the source code generation.
author Christian Humer <christian.humer@gmail.com>
date Tue, 21 May 2013 19:20:04 +0200
parents 5e3d1a68664e
children
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeAnnotationMirror.java	Tue May 21 19:19:34 2013 +0200
+++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeAnnotationMirror.java	Tue May 21 19:20:04 2013 +0200
@@ -26,8 +26,8 @@
 
 import javax.lang.model.element.*;
 import javax.lang.model.type.*;
-import javax.lang.model.util.*;
 
+import com.oracle.truffle.codegen.processor.*;
 import com.oracle.truffle.codegen.processor.api.element.*;
 
 public class CodeAnnotationMirror implements WritableAnnotationMirror {
@@ -60,13 +60,7 @@
     }
 
     public ExecutableElement findExecutableElement(String name) {
-        List<? extends ExecutableElement> elements = ElementFilter.methodsIn(annotationType.asElement().getEnclosedElements());
-        for (ExecutableElement executableElement : elements) {
-            if (executableElement.getSimpleName().toString().equals(name)) {
-                return executableElement;
-            }
-        }
-        return null;
+        return Utils.findExecutableElement(annotationType, name);
     }
 
     public static CodeAnnotationMirror clone(AnnotationMirror mirror) {