Package | Description |
---|---|
com.github.javaparser.ast.body | |
com.github.javaparser.ast.nodeTypes | |
com.github.javaparser.ast.visitor | |
com.github.javaparser.printer |
Modifier and Type | Method and Description |
---|---|
MethodDeclaration |
FieldDeclaration.createGetter()
Create a getter for this field, will only work if this field declares only 1 identifier and if this field is
already added to a ClassOrInterfaceDeclaration
|
MethodDeclaration |
FieldDeclaration.createSetter()
Create a setter for this field, will only work if this field declares only 1 identifier and if this field is
already added to a ClassOrInterfaceDeclaration
|
MethodDeclaration |
MethodDeclaration.setBody(BlockStmt body)
Sets the body
|
MethodDeclaration |
MethodDeclaration.setDefault(boolean isDefault) |
MethodDeclaration |
MethodDeclaration.setModifiers(EnumSet<Modifier> modifiers) |
MethodDeclaration |
MethodDeclaration.setName(SimpleName name) |
MethodDeclaration |
MethodDeclaration.setParameters(NodeList<Parameter> parameters) |
MethodDeclaration |
MethodDeclaration.setThrownExceptions(NodeList<ReferenceType> thrownExceptions) |
MethodDeclaration |
MethodDeclaration.setType(Type type) |
MethodDeclaration |
MethodDeclaration.setTypeParameters(NodeList<TypeParameter> typeParameters) |
Modifier and Type | Method and Description |
---|---|
default MethodDeclaration |
NodeWithMembers.addMethod(String methodName,
Modifier... modifiers)
Adds a methods with void return by default to this
|
Modifier and Type | Method and Description |
---|---|
default List<MethodDeclaration> |
NodeWithMembers.getMethods()
Find all methods in the members of this node.
|
default List<MethodDeclaration> |
NodeWithMembers.getMethodsByName(String name)
Try to find a
MethodDeclaration by its name |
default List<MethodDeclaration> |
NodeWithMembers.getMethodsByParameterTypes(Class<?>... paramTypes)
Try to find a
MethodDeclaration by its parameters types |
default List<MethodDeclaration> |
NodeWithMembers.getMethodsByParameterTypes(String... paramTypes)
Try to find a
MethodDeclaration by its parameters types |
Modifier and Type | Method and Description |
---|---|
R |
GenericVisitor.visit(MethodDeclaration n,
A arg) |
Visitable |
ModifierVisitor.visit(MethodDeclaration n,
A arg) |
void |
VoidVisitor.visit(MethodDeclaration n,
A arg) |
void |
VoidVisitorAdapter.visit(MethodDeclaration n,
A arg) |
R |
GenericVisitorAdapter.visit(MethodDeclaration n,
A arg) |
Visitable |
CloneVisitor.visit(MethodDeclaration _n,
Object _arg) |
Boolean |
EqualsVisitor.visit(MethodDeclaration n1,
Visitable arg) |
Modifier and Type | Method and Description |
---|---|
void |
PrettyPrintVisitor.visit(MethodDeclaration n,
Void arg) |
Copyright © 2007–2017. All rights reserved.