Uses of Class
com.github.javaparser.ast.body.BodyDeclaration
-
Packages that use BodyDeclaration Package Description com.github.javaparser com.github.javaparser.ast.body com.github.javaparser.ast.expr com.github.javaparser.ast.nodeTypes com.github.javaparser.printer -
-
Uses of BodyDeclaration in com.github.javaparser
Fields in com.github.javaparser with type parameters of type BodyDeclaration Modifier and Type Field Description static ParseStart<BodyDeclaration<?>>ParseStart. ANNOTATION_BODYstatic ParseStart<BodyDeclaration<?>>ParseStart. CLASS_BODYMethods in com.github.javaparser with type parameters of type BodyDeclaration Modifier and Type Method Description <T extends BodyDeclaration<?>>
ParseResult<T>JavaParser. parseBodyDeclaration(java.lang.String body)Parses a Java class or interface body declaration(e.g fields or methods) and returns aBodyDeclarationthat represents it.Methods in com.github.javaparser that return BodyDeclaration Modifier and Type Method Description BodyDeclaration<?>GeneratedJavaParser. AnnotationBodyDeclaration()Note thatAnnotationTypeMemberDeclaration(JLS) andAnnotationBodyDeclaration(JavaParser) are synonymous.BodyDeclaration<?>GeneratedJavaParser. AnnotationBodyDeclarationParseStart()BodyDeclaration<?>GeneratedJavaParser. ClassOrInterfaceBodyDeclaration()Note thatClassDeclarationandInterfaceDeclaration(in the JLS) include enum and annotation declarations.BodyDeclaration<?>GeneratedJavaParser. ClassOrInterfaceBodyDeclarationParseStart()BodyDeclaration<?>JavaParserAdapter. parseAnnotationBodyDeclaration(java.lang.String body)static BodyDeclaration<?>StaticJavaParser. parseAnnotationBodyDeclaration(java.lang.String body)Parses the Java annotation body declaration(e.g fields or methods) contained in aStringand returns aBodyDeclarationthat represents it.BodyDeclaration<?>JavaParserAdapter. parseBodyDeclaration(java.lang.String body)static BodyDeclaration<?>StaticJavaParser. parseBodyDeclaration(java.lang.String body)Parses a Java class or interface body declaration(e.g fields or methods) and returns aBodyDeclarationthat represents it.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 BodyDeclaration Modifier and Type Method Description NodeList<BodyDeclaration<?>>GeneratedJavaParser. AnnotationTypeBody()https://docs.oracle.com/javase/specs/jls/se15/html/jls-9.html#jls-9.6.1NodeList<BodyDeclaration<?>>GeneratedJavaParser. ClassOrInterfaceBody()https://docs.oracle.com/javase/specs/jls/se15/html/jls-8.html#jls-8.1.6ParseResult<BodyDeclaration<?>>JavaParser. parseAnnotationBodyDeclaration(java.lang.String body)Parses the Java annotation body declaration(e.g fields or methods) contained in aStringand returns aBodyDeclarationthat represents it.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 BodyDeclaration Modifier and Type Class Description classBodyDeclaration<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.body Modifier and Type Class Description classAnnotationDeclarationAn annotation type declaration.@interface X { ... }classAnnotationMemberDeclarationThe "int id();" in@interface X { int id(); }classCallableDeclaration<T extends CallableDeclaration<?>>Represents a declaration which is callable eg.classClassOrInterfaceDeclarationA definition of a class or interface.class X { ... }interface X { ... }classCompactConstructorDeclarationThe record declaration's constructorclassConstructorDeclarationA constructor declaration:class X { X() { } }where X(){} is the constructor declaration.classEnumConstantDeclarationOne of the values an enum can take.classEnumDeclarationThe declaration of an enum.enum X { ... }classFieldDeclarationThe declaration of a field in a class.classInitializerDeclarationA (possibly static) initializer body.classMethodDeclarationA method declaration.classRecordDeclarationThe record declarationclassTypeDeclaration<T extends TypeDeclaration<?>>A base class for all types of type declarations.Fields in com.github.javaparser.ast.body with type parameters of type BodyDeclaration Modifier and Type Field Description private NodeList<BodyDeclaration<?>>EnumConstantDeclaration. classBodyprivate NodeList<BodyDeclaration<?>>TypeDeclaration. membersMethods in com.github.javaparser.ast.body that return BodyDeclaration Modifier and Type Method Description BodyDeclaration<?>BodyDeclaration. clone()Methods in com.github.javaparser.ast.body that return types with arguments of type BodyDeclaration Modifier and Type Method Description NodeList<BodyDeclaration<?>>EnumConstantDeclaration. getClassBody()NodeList<BodyDeclaration<?>>TypeDeclaration. getMembers()Methods in com.github.javaparser.ast.body with parameters of type BodyDeclaration Modifier and Type Method Description TTypeDeclaration. addMember(BodyDeclaration<?> decl)Adds the given declaration to the specified type.Method parameters in com.github.javaparser.ast.body with type arguments of type BodyDeclaration Modifier and Type Method Description EnumConstantDeclarationEnumConstantDeclaration. setClassBody(NodeList<BodyDeclaration<?>> classBody)TTypeDeclaration. 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 BodyDeclaration Modifier and Type Field Description private NodeList<BodyDeclaration<?>>ObjectCreationExpr. anonymousClassBodyMethods in com.github.javaparser.ast.expr that return types with arguments of type BodyDeclaration Modifier and Type Method Description java.util.Optional<NodeList<BodyDeclaration<?>>>ObjectCreationExpr. getAnonymousClassBody()Methods in com.github.javaparser.ast.expr with parameters of type BodyDeclaration Modifier and Type Method Description voidObjectCreationExpr. addAnonymousClassBody(BodyDeclaration<?> body)Method parameters in com.github.javaparser.ast.expr with type arguments of type BodyDeclaration Modifier and Type Method Description ObjectCreationExprObjectCreationExpr. 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 BodyDeclaration Modifier and Type Method Description default BodyDeclaration<?>NodeWithMembers. getMember(int i)Methods in com.github.javaparser.ast.nodeTypes that return types with arguments of type BodyDeclaration Modifier and Type Method Description NodeList<BodyDeclaration<?>>NodeWithMembers. getMembers()Methods in com.github.javaparser.ast.nodeTypes with parameters of type BodyDeclaration Modifier and Type Method Description default NNodeWithMembers. addMember(BodyDeclaration<?> member)default NNodeWithMembers. setMember(int i, BodyDeclaration<?> member)Method parameters in com.github.javaparser.ast.nodeTypes with type arguments of type BodyDeclaration Modifier and Type Method Description NNodeWithMembers. setMembers(NodeList<BodyDeclaration<?>> members) -
Uses of BodyDeclaration in com.github.javaparser.printer
Method parameters in com.github.javaparser.printer with type arguments of type BodyDeclaration Modifier and Type Method Description protected voidDefaultPrettyPrinterVisitor. printMembers(NodeList<BodyDeclaration<?>> members, java.lang.Void arg)protected voidPrettyPrintVisitor. printMembers(NodeList<BodyDeclaration<?>> members, java.lang.Void arg)Deprecated.
-