src/share/classes/com/sun/tools/javac/comp/Check.java

changeset 1326
30c36e23f154
parent 1313
873ddd9f4900
child 1337
2eca84194807
equal deleted inserted replaced
1325:b2064a216117 1326:30c36e23f154
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);

mercurial