For JLS2:
BodyDeclaration: ClassDeclaration InterfaceDeclaration MethodDeclaration ConstructorDeclaration FieldDeclaration InitializerFor JLS3, a number of new node types were introduced:
BodyDeclaration: ClassDeclaration InterfaceDeclaration EnumDeclaration MethodDeclaration ConstructorDeclaration FieldDeclaration Initializer EnumConstantDeclaration AnnotationTypeDeclaration AnnotationTypeMemberDeclaration
All types of body declarations carry modifiers (and annotations), although they differ in which modifiers are allowed. Most types of body declarations can carry a doc comment; Initializer is the only ones that does not. The source range for body declarations always includes the doc comment if present.
@since 2.0
|
|
|
|