diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/TruffleProcessor.java @ 15040:288c23143d47

Fix most raw type references.
author Josef Eisl <josef.eisl@jku.at>
date Wed, 09 Apr 2014 19:08:53 +0200
parents 64dcb92ee75a
children bd28da642eea
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/TruffleProcessor.java	Wed Apr 09 10:33:44 2014 -0700
+++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/TruffleProcessor.java	Wed Apr 09 19:08:53 2014 +0200
@@ -60,7 +60,7 @@
         // TODO run verifications that other annotations are not processed out of scope of the
         // operation or typelattice.
         try {
-            for (AnnotationProcessor generator : getGenerators()) {
+            for (AnnotationProcessor<?> generator : getGenerators()) {
                 AbstractParser<?> parser = generator.getParser();
                 if (parser.getAnnotationType() != null) {
                     for (Element e : env.getElementsAnnotatedWith(parser.getAnnotationType())) {
@@ -86,7 +86,7 @@
         }
     }
 
-    private static void processElement(RoundEnvironment env, AnnotationProcessor generator, Element e, boolean callback) {
+    private static void processElement(RoundEnvironment env, AnnotationProcessor<?> generator, Element e, boolean callback) {
         try {
             generator.process(env, e, callback);
         } catch (Throwable e1) {
@@ -94,16 +94,15 @@
         }
     }
 
-    private static void handleThrowable(AnnotationProcessor generator, Throwable t, Element e) {
+    private static void handleThrowable(AnnotationProcessor<?> generator, Throwable t, Element e) {
         String message = "Uncaught error in " + generator.getClass().getSimpleName() + " while processing " + e;
         generator.getContext().getEnvironment().getMessager().printMessage(Kind.ERROR, message + ": " + Utils.printException(t), e);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public void callback(TypeElement template) {
-        for (AnnotationProcessor generator : generators) {
-            Class annotationType = generator.getParser().getAnnotationType();
+        for (AnnotationProcessor<?> generator : generators) {
+            Class<? extends Annotation> annotationType = generator.getParser().getAnnotationType();
             if (annotationType != null) {
                 Annotation annotation = template.getAnnotation(annotationType);
                 if (annotation != null) {