Modifier and Type | Method and Description |
---|---|
<N extends Node> |
JavaParser.parse(ParseStart<N> start,
Provider provider)
Parses source code.
|
Modifier and Type | Method and Description |
---|---|
Node |
HasParentNode.getParentNodeForChildren()
this for everything except NodeLists.
|
Modifier and Type | Method and Description |
---|---|
Optional<Node> |
HasParentNode.getParentNode()
Return the parent node or null, if no parent is set.
|
Modifier and Type | Method and Description |
---|---|
default void |
HasParentNode.setAsParentNodeOf(Node childNode) |
T |
HasParentNode.setParentNode(Node parentNode)
Set the parent node.
|
Modifier and Type | Method and Description |
---|---|
default void |
HasParentNode.setAsParentNodeOf(List<? extends Node> childNodes) |
Modifier and Type | Class and Description |
---|---|
class |
NodeList<N extends Node>
A list of nodes.
|
Modifier and Type | Class and Description |
---|---|
class |
ArrayCreationLevel
In
new int[1][2]; there are two ArrayCreationLevel objects,
the first one contains the expression "1",
the second the expression "2". |
class |
CompilationUnit
This class represents the entire compilation unit.
|
class |
ImportDeclaration
An import declaration.
|
class |
PackageDeclaration
A package declaration.
|
Modifier and Type | Field and Description |
---|---|
static Comparator<Node> |
Node.NODE_BY_BEGIN_POSITION
This can be used to sort nodes on position.
|
Modifier and Type | Method and Description |
---|---|
<N extends Node> |
Node.containsWithin(N other) |
<N extends Node> |
Node.getNodesByType(Class<N> clazz)
Recursively finds all nodes of a certain type.
|
static <X extends Node> |
NodeList.nodeList(Collection<X> nodes) |
static <X extends Node> |
NodeList.nodeList(NodeList<X> nodes) |
static <X extends Node> |
NodeList.nodeList(X... nodes) |
Modifier and Type | Method and Description |
---|---|
Node |
Node.clone() |
Node |
Node.getParentNodeForChildren() |
Node |
NodeList.getParentNodeForChildren() |
Node |
Node.setBlockComment(String comment)
Use this to store additional information to this node.
|
Node |
Node.setComment(Comment comment)
Use this to store additional information to this node.
|
Node |
Node.setLineComment(String comment)
Use this to store additional information to this node.
|
Node |
Node.setParentNode(Node parentNode)
Assign a new parent to this node, removing it
from the list of children of the previous parent, if any.
|
Node |
Node.setRange(Range range) |
Modifier and Type | Method and Description |
---|---|
List<Node> |
Node.getChildNodes()
Contains all nodes that have this node set as their parent.
|
Optional<Node> |
Node.getParentNode() |
Optional<Node> |
NodeList.getParentNode() |
Modifier and Type | Method and Description |
---|---|
static <X extends Node> |
NodeList.nodeList(X... nodes) |
boolean |
NodeList.remove(Node node) |
Node |
Node.setParentNode(Node parentNode)
Assign a new parent to this node, removing it
from the list of children of the previous parent, if any.
|
NodeList<N> |
NodeList.setParentNode(Node parentNode)
Sets the parentNode
|
Modifier and Type | Method and Description |
---|---|
protected void |
Node.setAsParentNodeOf(NodeList<? extends Node> list) |
Constructor and Description |
---|
NodeList(Node parent) |
Modifier and Type | Class and Description |
---|---|
class |
BodyDeclaration<T extends Node>
Any declaration that can appear between the { and } of a class, interface, or enum.
|
class |
TypeDeclaration<T extends Node>
A base class for all types of type declarations.
|
Modifier and Type | Class and Description |
---|---|
class |
AnnotationDeclaration
An annotation type declaration.
@interface X { ... |
class |
AnnotationMemberDeclaration
The "int id();" in
@interface X { int id(); } |
class |
BodyDeclaration<T extends Node>
Any declaration that can appear between the { and } of a class, interface, or enum.
|
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 |
EmptyMemberDeclaration
Deprecated.
these ;'s should be ignored
|
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 |
Parameter
The parameters to a method or lambda.
|
class |
TypeDeclaration<T extends Node>
A base class for all types of type declarations.
|
class |
VariableDeclarator
The declaration of a variable.
int x = 14; |
Modifier and Type | Class and Description |
---|---|
class |
BlockComment
AST node that represent block comments.
|
class |
Comment
Abstract class for all AST nodes that represent comments.
|
class |
JavadocComment
A Javadoc comment.
|
class |
LineComment
AST node that represent line comments.
|
Modifier and Type | Method and Description |
---|---|
Optional<Node> |
Comment.getCommentedNode() |
Modifier and Type | Method and Description |
---|---|
Comment |
Comment.setCommentedNode(Node commentedNode)
Sets the commentedNode
|
Modifier and Type | Class and Description |
---|---|
class |
AnnotationExpr
A base class for the different types of annotations.
|
class |
ArrayAccessExpr
Array brackets [] being used to get a value from an array.
|
class |
ArrayCreationExpr
new int[5][4][][] or new int[][]{{1},{2,3}} . |
class |
ArrayInitializerExpr
The initialization of an array.
|
class |
AssignExpr
An assignment expression.
|
class |
BinaryExpr
An expression with an expression on the left, an expression on the right, and an operator in the middle.
|
class |
BooleanLiteralExpr
The boolean literals.
|
class |
CastExpr
A typecast.
|
class |
CharLiteralExpr
A literal character.
|
class |
ClassExpr
Defines an expression that accesses the class of a type.
|
class |
ConditionalExpr
An if-then or if-then-else construct.
|
class |
DoubleLiteralExpr
A float or a double constant.
|
class |
EnclosedExpr
An expression between ( ).
|
class |
Expression
A base class for all expressions.
|
class |
FieldAccessExpr
Access of a field of an object.
|
class |
InstanceOfExpr
Usage of the instanceof operator.
|
class |
IntegerLiteralExpr
All ways to specify an int literal.
|
class |
LambdaExpr
A lambda expression.
|
class |
LiteralExpr
A base class for all literal expressions.
|
class |
LongLiteralExpr
All ways to specify a long literal.
|
class |
MarkerAnnotationExpr
An annotation that uses only the annotation type name.
|
class |
MemberValuePair
A value for a member of an annotation.
|
class |
MethodCallExpr
A method call on an object.
|
class |
MethodReferenceExpr
Method reference expressions introduced in Java 8 specifically designed to simplify lambda Expressions.
|
class |
Name
A name that may consist of multiple identifiers.
|
class |
NameExpr
Whenever a SimpleName is used in an expression, it is wrapped in NameExpr.
|
class |
NormalAnnotationExpr
An annotation that has zero or more key-value pairs.
@Mapping(a=5, d=10) |
class |
NullLiteralExpr
A literal "null".
|
class |
ObjectCreationExpr
A constructor call.
|
class |
SimpleName
A name that consists of a single identifier.
|
class |
SingleMemberAnnotationExpr
An annotation that has a single value.
|
class |
StringLiteralExpr
A literal string.
|
class |
SuperExpr
An occurrence of the "super" keyword.
|
class |
ThisExpr
An occurrence of the "this" keyword.
|
class |
TypeExpr
This class is just instantiated as scopes for MethodReferenceExpr nodes to encapsulate Types.
|
class |
UnaryExpr
An expression where an operator is applied to a single expression.
|
class |
VariableDeclarationExpr
A declaration of variables.
|
Modifier and Type | Interface and Description |
---|---|
interface |
BadNode<N extends Node>
A node with parse problems.
|
interface |
NodeWithAnnotations<N extends Node>
A node that can be annotated.
|
interface |
NodeWithArguments<N extends Node>
A node with arguments.
|
interface |
NodeWithBlockStmt<N extends Node>
A node with a body that is a BlockStmt.
|
interface |
NodeWithBody<N extends Node> |
interface |
NodeWithExpression<N extends Node>
A node that has an expression in it.
|
interface |
NodeWithExtends<N extends Node>
A node that extends other types.
|
interface |
NodeWithIdentifier<N extends Node> |
interface |
NodeWithImplements<N extends Node>
A node that implements other types.
|
interface |
NodeWithJavadoc<N extends Node>
A node that can be documented with a Javadoc comment.
|
interface |
NodeWithMembers<N extends Node>
A node having members.
|
interface |
NodeWithModifiers<N extends Node>
A Node with Modifiers.
|
interface |
NodeWithName<N extends Node>
A node with a (qualified) name.
|
interface |
NodeWithOptionalBlockStmt<N extends Node>
A node with a body that is a BlockStmt, which is optional.
|
interface |
NodeWithOptionalLabel<T extends Node>
A node that can have a label.
|
interface |
NodeWithOptionalScope<N extends Node>
Represents a node which can have a scope expression eg.
|
interface |
NodeWithParameters<N extends Node> |
interface |
NodeWithSimpleName<N extends Node>
A node with a name.
|
interface |
NodeWithStatements<N extends Node>
A node that contains a list of statements.
|
interface |
NodeWithThrownExceptions<N extends Node>
A node that declares the types of exception it throws.
|
interface |
NodeWithType<N extends Node,T extends Type>
A node with a type.
|
interface |
NodeWithTypeArguments<N extends Node>
A node that can have type arguments.
|
interface |
NodeWithTypeParameters<N extends Node>
A node that can have type parameters.
|
interface |
NodeWithVariables<N extends Node>
A node which has a list of variables.
|
Modifier and Type | Method and Description |
---|---|
void |
PropagatingAstObserver.concreteListChange(NodeList observedNode,
AstObserver.ListChangeType type,
int index,
Node nodeAddedOrRemoved) |
void |
PropagatingAstObserver.concretePropertyChange(Node observedNode,
ObservableProperty property,
Object oldValue,
Object newValue) |
void |
PropagatingAstObserver.listChange(NodeList observedNode,
AstObserver.ListChangeType type,
int index,
Node nodeAddedOrRemoved) |
void |
AstObserver.listChange(NodeList observedNode,
AstObserver.ListChangeType type,
int index,
Node nodeAddedOrRemoved)
A list is changed
|
void |
AstObserverAdapter.listChange(NodeList observedNode,
AstObserver.ListChangeType type,
int index,
Node nodeAddedOrRemoved) |
void |
PropagatingAstObserver.parentChange(Node observedNode,
Node previousParent,
Node newParent) |
void |
AstObserver.parentChange(Node observedNode,
Node previousParent,
Node newParent)
The parent of a node is changed
|
void |
AstObserverAdapter.parentChange(Node observedNode,
Node previousParent,
Node newParent) |
void |
PropagatingAstObserver.propertyChange(Node observedNode,
ObservableProperty property,
Object oldValue,
Object newValue) |
void |
AstObserver.propertyChange(Node observedNode,
ObservableProperty property,
Object oldValue,
Object newValue)
The value of a property is changed
|
void |
AstObserverAdapter.propertyChange(Node observedNode,
ObservableProperty property,
Object oldValue,
Object newValue) |
Modifier and Type | Class and Description |
---|---|
class |
AssertStmt
A usage of the keyword "assert"
In assert dead : "Wasn't expecting to be dead here"; the check is "dead" and the message is the string. |
class |
BlockStmt
Statements in between { and }.
|
class |
BreakStmt
A usage of the break keyword.
|
class |
CatchClause
The catch part of a try-catch-finally.
|
class |
ContinueStmt
A continue statement with an optional label;
continue brains;
continue; |
class |
DoStmt
A do-while.
|
class |
EmptyStmt
Deprecated.
these ;'s should be ignored
|
class |
ExplicitConstructorInvocationStmt
A call to super or this in a constructor or initializer.
|
class |
ExpressionStmt
Used to wrap an expression so that it can take the place of a statement.
|
class |
ForeachStmt
A for-each statement.
|
class |
ForStmt
A classic for statement.
|
class |
IfStmt
An if-then-else statement.
|
class |
LabeledStmt
A statement that is labeled, like
label123: println("continuing"); |
class |
LocalClassDeclarationStmt
A class declaration inside a method.
|
class |
ReturnStmt
The return statement, with an optional expression to return.
|
class |
Statement
A base class for all statements.
|
class |
SwitchEntryStmt
One case in a switch statement.
|
class |
SwitchStmt
A switch statement.
|
class |
SynchronizedStmt
Usage of the synchronized keyword.
|
class |
ThrowStmt
Usage of the throw statement.
|
class |
TryStmt
The try statement.
|
class |
WhileStmt
A while statement.
|
Modifier and Type | Class and Description |
---|---|
class |
ArrayType
To indicate that a type is an array, it gets wrapped in an ArrayType for every array level it has.
|
class |
ClassOrInterfaceType
A class or an interface type.
|
class |
IntersectionType
Represents a set of types.
|
class |
PrimitiveType
A primitive type.
|
class |
ReferenceType<T extends ReferenceType>
Base class for reference types.
|
class |
Type
Base class for types.
|
class |
TypeParameter
A type parameter.
|
class |
UnionType
Represents a set of types.
|
class |
UnknownType
An unknown parameter type object.
|
class |
VoidType
The return type of a
MethodDeclaration
when it returns void. |
class |
WildcardType
A wildcard type argument.
|
Modifier and Type | Method and Description |
---|---|
protected <T extends Node> |
CloneVisitor.cloneNode(Optional<T> _node,
Object _arg) |
protected <T extends Node> |
CloneVisitor.cloneNode(T _node,
Object _arg) |
Modifier and Type | Method and Description |
---|---|
Node |
ModifierVisitor.visit(ImportDeclaration n,
A arg) |
Node |
CloneVisitor.visit(ImportDeclaration _n,
Object _arg) |
Modifier and Type | Method and Description |
---|---|
static boolean |
EqualsVisitor.equals(Node n1,
Node n2) |
abstract void |
TreeVisitor.process(Node node) |
void |
TreeVisitor.visitBreadthFirst(Node node)
https://en.wikipedia.org/wiki/Breadth-first_search
|
void |
TreeVisitor.visitDepthFirst(Node node)
https://en.wikipedia.org/wiki/Depth-first_search
|
Modifier and Type | Method and Description |
---|---|
String |
PrettyPrinter.print(Node node) |
Modifier and Type | Method and Description |
---|---|
static <T extends Node> |
PositionUtils.sortByBeginPosition(List<T> nodes) |
static <T extends Node> |
PositionUtils.sortByBeginPosition(List<T> nodes,
boolean ignoringAnnotations) |
static <T extends Node> |
PositionUtils.sortByBeginPosition(NodeList<T> nodes) |
static <T extends Node> |
PositionUtils.sortByBeginPosition(NodeList<T> nodes,
boolean ignoringAnnotations) |
Modifier and Type | Method and Description |
---|---|
static boolean |
PositionUtils.areInOrder(Node a,
Node b) |
static boolean |
PositionUtils.areInOrder(Node a,
Node b,
boolean ignoringAnnotations) |
static AnnotationExpr |
PositionUtils.getLastAnnotation(Node node) |
static boolean |
PositionUtils.nodeContains(Node container,
Node contained,
boolean ignoringAnnotations) |
Copyright © 2007–2017. All rights reserved.