Uses of Class
com.github.javaparser.ast.body.BodyDeclaration
Packages that use BodyDeclaration
Package
Description
-
Uses of BodyDeclaration in com.github.javaparser
Fields in com.github.javaparser with type parameters of type BodyDeclarationModifier and TypeFieldDescriptionstatic final ParseStart
<BodyDeclaration<?>> ParseStart.ANNOTATION_BODY
static final ParseStart
<BodyDeclaration<?>> ParseStart.CLASS_BODY
Methods in com.github.javaparser with type parameters of type BodyDeclarationModifier and TypeMethodDescription<T extends BodyDeclaration<?>>
ParseResult<T> JavaParser.parseBodyDeclaration
(String body) Parses a Java class or interface body declaration(e.g fields or methods) and returns aBodyDeclaration
that represents it.Methods in com.github.javaparser that return BodyDeclarationModifier and TypeMethodDescriptionfinal BodyDeclaration
<?> GeneratedJavaParser.AnnotationBodyDeclaration()
Note thatAnnotationTypeMemberDeclaration
(JLS) andAnnotationBodyDeclaration
(JavaParser) are synonymous.final BodyDeclaration
<?> GeneratedJavaParser.AnnotationBodyDeclarationParseStart()
final BodyDeclaration
<?> GeneratedJavaParser.ClassOrInterfaceBodyDeclaration()
Note thatClassDeclaration
andInterfaceDeclaration
(in the JLS) include enum and annotation declarations.final BodyDeclaration
<?> GeneratedJavaParser.ClassOrInterfaceBodyDeclarationParseStart()
JavaParserAdapter.parseAnnotationBodyDeclaration
(String body) static BodyDeclaration
<?> StaticJavaParser.parseAnnotationBodyDeclaration
(String body) Parses the Java annotation body declaration(e.g fields or methods) contained in aString
and returns aBodyDeclaration
that represents it.JavaParserAdapter.parseBodyDeclaration
(String body) static BodyDeclaration
<?> StaticJavaParser.parseBodyDeclaration
(String body) Parses a Java class or interface body declaration(e.g fields or methods) and returns aBodyDeclaration
that represents it.final BodyDeclaration
<?> GeneratedJavaParser.RecordBodyDeclaration()
Almost identical to ClassOrInterfaceBodyDeclaration, but: - with a CompactConstructorDeclaration As a result, there may be some scope/potential to optimize this and merge some parts together.Methods in com.github.javaparser that return types with arguments of type BodyDeclarationModifier and TypeMethodDescriptionfinal NodeList
<BodyDeclaration<?>> GeneratedJavaParser.AnnotationTypeBody()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-9.html#jls-9.6.1final NodeList
<BodyDeclaration<?>> GeneratedJavaParser.ClassOrInterfaceBody()
https://docs.oracle.com/javase/specs/jls/se15/html/jls-8.html#jls-8.1.6JavaParser.parseAnnotationBodyDeclaration
(String body) Parses the Java annotation body declaration(e.g fields or methods) contained in aString
and returns aBodyDeclaration
that represents it.final NodeList
<BodyDeclaration<?>> GeneratedJavaParser.RecordBody()
Everything that can go into a "regular" class or interface declaration, can also (usually) be included within a record. -
Uses of BodyDeclaration in com.github.javaparser.ast.body
Classes in com.github.javaparser.ast.body with type parameters of type BodyDeclarationModifier and TypeClassDescriptionclass
BodyDeclaration<T extends BodyDeclaration<?>>
Any declaration that can appear between the { and } of a class, interface, enum, or record.Subclasses of BodyDeclaration in com.github.javaparser.ast.bodyModifier and TypeClassDescriptionclass
An annotation type declaration.@interface X { ... }
class
The "int id();" in@interface X { int id(); }
class
CallableDeclaration<T extends CallableDeclaration<?>>
Represents a declaration which is callable eg.class
A definition of a class or interface.class X { ... }
interface X { ... }
class
The record declaration's constructorclass
A constructor declaration:class X { X() { } }
where X(){} is the constructor declaration.class
One of the values an enum can take.class
The declaration of an enum.enum X { ... }
class
The declaration of a field in a class.class
A (possibly static) initializer body.class
A method declaration.class
The record declarationclass
TypeDeclaration<T extends TypeDeclaration<?>>
A base class for all types of type declarations.Fields in com.github.javaparser.ast.body with type parameters of type BodyDeclarationModifier and TypeFieldDescriptionprivate NodeList
<BodyDeclaration<?>> EnumConstantDeclaration.classBody
private NodeList
<BodyDeclaration<?>> TypeDeclaration.members
Methods in com.github.javaparser.ast.body that return BodyDeclarationMethods in com.github.javaparser.ast.body that return types with arguments of type BodyDeclarationModifier and TypeMethodDescriptionEnumConstantDeclaration.getClassBody()
TypeDeclaration.getMembers()
Methods in com.github.javaparser.ast.body with parameters of type BodyDeclarationModifier and TypeMethodDescriptionTypeDeclaration.addMember
(BodyDeclaration<?> decl) Adds the given declaration to the specified type.Method parameters in com.github.javaparser.ast.body with type arguments of type BodyDeclarationModifier and TypeMethodDescriptionEnumConstantDeclaration.setClassBody
(NodeList<BodyDeclaration<?>> classBody) TypeDeclaration.setMembers
(NodeList<BodyDeclaration<?>> members) -
Uses of BodyDeclaration in com.github.javaparser.ast.expr
Fields in com.github.javaparser.ast.expr with type parameters of type BodyDeclarationModifier and TypeFieldDescriptionprivate NodeList
<BodyDeclaration<?>> ObjectCreationExpr.anonymousClassBody
Methods in com.github.javaparser.ast.expr that return types with arguments of type BodyDeclarationMethods in com.github.javaparser.ast.expr with parameters of type BodyDeclarationModifier and TypeMethodDescriptionvoid
ObjectCreationExpr.addAnonymousClassBody
(BodyDeclaration<?> body) Method parameters in com.github.javaparser.ast.expr with type arguments of type BodyDeclarationModifier and TypeMethodDescriptionObjectCreationExpr.setAnonymousClassBody
(NodeList<BodyDeclaration<?>> anonymousClassBody) Sets the anonymousClassBody
Null means no class body
Empty NodeList means new ClassName(){ } -
Uses of BodyDeclaration in com.github.javaparser.ast.nodeTypes
Methods in com.github.javaparser.ast.nodeTypes that return BodyDeclarationMethods in com.github.javaparser.ast.nodeTypes that return types with arguments of type BodyDeclarationMethods in com.github.javaparser.ast.nodeTypes with parameters of type BodyDeclarationModifier and TypeMethodDescriptiondefault N
NodeWithMembers.addMember
(BodyDeclaration<?> member) default N
NodeWithMembers.setMember
(int i, BodyDeclaration<?> member) Method parameters in com.github.javaparser.ast.nodeTypes with type arguments of type BodyDeclarationModifier and TypeMethodDescriptionNodeWithMembers.setMembers
(NodeList<BodyDeclaration<?>> members) -
Uses of BodyDeclaration in com.github.javaparser.printer
Method parameters in com.github.javaparser.printer with type arguments of type BodyDeclarationModifier and TypeMethodDescriptionprotected void
DefaultPrettyPrinterVisitor.printMembers
(NodeList<BodyDeclaration<?>> members, Void arg) protected void
PrettyPrintVisitor.printMembers
(NodeList<BodyDeclaration<?>> members, Void arg) Deprecated.