Abstract base class of all AST nodes that represent body declarations that may appear in the body of some kind of class or interface declaration, including anonymous class declarations, enumeration declarations, and enumeration constant declarations.
For JLS2:
BodyDeclaration: ClassDeclaration InterfaceDeclaration MethodDeclaration ConstructorDeclaration FieldDeclaration Initializer
For 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