Package | Description |
---|---|
com.github.javaparser | |
com.github.javaparser.ast.body | |
com.github.javaparser.ast.expr | |
com.github.javaparser.ast.nodeTypes |
Modifier and Type | Field | Description |
---|---|---|
static ParseStart<BodyDeclaration<?>> |
ParseStart.ANNOTATION_BODY |
|
static ParseStart<BodyDeclaration<?>> |
ParseStart.CLASS_BODY |
Modifier and Type | Method | Description |
---|---|---|
static BodyDeclaration<?> |
JavaParser.parseAnnotationBodyDeclaration(String body) |
Parses the Java annotation body declaration(e.g fields or methods) contained in a
String and returns a BodyDeclaration that represents it. |
static BodyDeclaration<?> |
JavaParser.parseBodyDeclaration(String body) |
Parses a Java class or interface body declaration(e.g fields or methods) and returns a
BodyDeclaration that represents it. |
static BodyDeclaration<?> |
JavaParser.parseClassBodyDeclaration(String body) |
Deprecated.
just use parseBodyDeclaration now.
|
static BodyDeclaration<?> |
JavaParser.parseInterfaceBodyDeclaration(String body) |
Deprecated.
just use parseBodyDeclaration now.
|
Modifier and Type | Class | Description |
---|---|---|
class |
BodyDeclaration<T extends BodyDeclaration<?>> |
Any declaration that can appear between the { and } of a class, interface, or enum.
|
Modifier and Type | Class | Description |
---|---|---|
class |
AnnotationDeclaration |
An annotation type declaration.
@interface X { ... |
class |
AnnotationMemberDeclaration |
The "int id();" in
@interface X { int id(); } |
class |
CallableDeclaration<T extends CallableDeclaration<?>> |
Represents a declaration which is callable eg.
|
class |
ClassOrInterfaceDeclaration |
A definition of a class or interface.
class X { ... |
class |
ConstructorDeclaration |
A constructor declaration:
class X { X() { } } where X(){} is the constructor declaration. |
class |
EnumConstantDeclaration |
One of the values an enum can take.
|
class |
EnumDeclaration |
The declaration of an enum.
enum X { ... |
class |
FieldDeclaration |
The declaration of a field in a class.
|
class |
InitializerDeclaration |
A (possibly static) initializer body.
|
class |
MethodDeclaration |
A method declaration.
|
class |
TypeDeclaration<T extends TypeDeclaration<?>> |
A base class for all types of type declarations.
|
Modifier and Type | Method | Description |
---|---|---|
BodyDeclaration<?> |
BodyDeclaration.clone() |
Modifier and Type | Method | Description |
---|---|---|
NodeList<BodyDeclaration<?>> |
EnumConstantDeclaration.getClassBody() |
|
NodeList<BodyDeclaration<?>> |
TypeDeclaration.getMembers() |
Modifier and Type | Method | Description |
---|---|---|
T |
TypeDeclaration.addMember(BodyDeclaration<?> decl) |
Adds the given declaration to the specified type.
|
Modifier and Type | Method | Description |
---|---|---|
EnumConstantDeclaration |
EnumConstantDeclaration.setClassBody(NodeList<BodyDeclaration<?>> classBody) |
|
T |
TypeDeclaration.setMembers(NodeList<BodyDeclaration<?>> members) |
Modifier and Type | Method | Description |
---|---|---|
Optional<NodeList<BodyDeclaration<?>>> |
ObjectCreationExpr.getAnonymousClassBody() |
Modifier and Type | Method | Description |
---|---|---|
void |
ObjectCreationExpr.addAnonymousClassBody(BodyDeclaration<?> body) |
Modifier and Type | Method | Description |
---|---|---|
ObjectCreationExpr |
ObjectCreationExpr.setAnonymousClassBody(NodeList<BodyDeclaration<?>> anonymousClassBody) |
Sets the anonymousClassBody
Null means no class body Empty NodeList means new ClassName(){ } |
Modifier and Type | Method | Description |
---|---|---|
default BodyDeclaration<?> |
NodeWithMembers.getMember(int i) |
Modifier and Type | Method | Description |
---|---|---|
NodeList<BodyDeclaration<?>> |
NodeWithMembers.getMembers() |
Modifier and Type | Method | Description |
---|---|---|
default N |
NodeWithMembers.addMember(BodyDeclaration<?> member) |
|
default N |
NodeWithMembers.setMember(int i,
BodyDeclaration<?> member) |
Modifier and Type | Method | Description |
---|---|---|
N |
NodeWithMembers.setMembers(NodeList<BodyDeclaration<?>> members) |
Copyright © 2007–2019. All rights reserved.