langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
changeset 13844 56339cf983a3
parent 13689 4d519199a6aa
child 14047 7c7a5611cf76
equal deleted inserted replaced
13843:1ac97278d72b 13844:56339cf983a3
  2371             }
  2371             }
  2372         }
  2372         }
  2373         tree.accept(new AnnotationValidator());
  2373         tree.accept(new AnnotationValidator());
  2374     }
  2374     }
  2375 
  2375 
  2376     /** Annotation types are restricted to primitives, String, an
  2376     /**
       
  2377      *  {@literal
       
  2378      *  Annotation types are restricted to primitives, String, an
  2377      *  enum, an annotation, Class, Class<?>, Class<? extends
  2379      *  enum, an annotation, Class, Class<?>, Class<? extends
  2378      *  Anything>, arrays of the preceding.
  2380      *  Anything>, arrays of the preceding.
       
  2381      *  }
  2379      */
  2382      */
  2380     void validateAnnotationType(JCTree restype) {
  2383     void validateAnnotationType(JCTree restype) {
  2381         // restype may be null if an error occurred, so don't bother validating it
  2384         // restype may be null if an error occurred, so don't bother validating it
  2382         if (restype != null) {
  2385         if (restype != null) {
  2383             validateAnnotationType(restype.pos(), restype.type);
  2386             validateAnnotationType(restype.pos(), restype.type);