AnnotationTypeMemberDeclaration extends MethodDeclaration and ExecutableDeclaration and thus has the getParameters() method, which I would have thought always return an empty set since methods in AnnotationTypes cannot have paramters. However, it an annotation type's method(s) if defined with parameters it works as if it's a normal interface.
A subsequent compile of the interface, if called, will fail. However, if a user is using -nocompile and their own subsequent compile, it's concievable they could be producing unexpected generated source(class) files.
A subsequent compile of the interface, if called, will fail. However, if a user is using -nocompile and their own subsequent compile, it's concievable they could be producing unexpected generated source(class) files.
- duplicates
-
JDK-5009793 apt api does not enforce annotation declaration restrictions
-
- Closed
-