Package com.sun.source.tree

Provides interfaces to represent source code as abstract syntax trees (AST).

Since:
1.6
Interface Description
AnnotatedTypeTree

A tree node for an annotated type.

AnnotationTree

A tree node for an annotation.

ArrayAccessTree

A tree node for an array access expression.

ArrayTypeTree

A tree node for an array type.

AssertTree

A tree node for an assert statement.

AssignmentTree

A tree node for an assignment expression.

BinaryTree

A tree node for a binary expression.

BlockTree

A tree node for a statement block.

BreakTree

A tree node for a break statement.

CaseTree

A tree node for a case in a switch statement.

CatchTree

A tree node for a catch block in a try statement.

ClassTree

A tree node for a class, interface, enum, or annotation type declaration.

CompilationUnitTree

Represents the abstract syntax tree for compilation units (source files) and package declarations (package-info.java).

CompoundAssignmentTree

A tree node for compound assignment operator.

ConditionalExpressionTree

A tree node for the conditional operator ?

ContinueTree

A tree node for a continue statement.

DirectiveTree

A super-type for all the directives in a ModuleTree.

DoWhileLoopTree

A tree node for a do statement.

EmptyStatementTree

A tree node for an empty (skip) statement.

EnhancedForLoopTree

A tree node for an "enhanced" for loop statement.

ErroneousTree

A tree node to stand in for a malformed expression.

ExportsTree

A tree node for an 'exports' directive in a module declaration.

ExpressionStatementTree

A tree node for an expression statement.

ExpressionTree

A tree node used as the base class for the different types of expressions.

ForLoopTree

A tree node for a basic for loop statement.

IdentifierTree

A tree node for an identifier expression.

IfTree

A tree node for an if statement.

ImportTree

A tree node for an import declaration.

InstanceOfTree

A tree node for an instanceof expression.

IntersectionTypeTree

A tree node for an intersection type in a cast expression.

LabeledStatementTree

A tree node for a labeled statement.

LambdaExpressionTree

A tree node for a lambda expression.

LineMap

Provides methods to convert between character positions and line numbers for a compilation unit.

LiteralTree

A tree node for a literal expression.

MemberReferenceTree

A tree node for a member reference expression.

MemberSelectTree

A tree node for a member access expression.

MethodInvocationTree

A tree node for a method invocation expression.

MethodTree

A tree node for a method or annotation type element declaration.

ModifiersTree

A tree node for the modifiers, including annotations, for a declaration.

ModuleTree

A tree node for a module declaration.

NewArrayTree

A tree node for an expression to create a new instance of an array.

NewClassTree

A tree node to declare a new instance of a class.

OpensTree

A tree node for an 'opens' directive in a module declaration.

PackageTree

Represents the package declaration.

ParameterizedTypeTree

A tree node for a type expression involving type parameters.

ParenthesizedTree

A tree node for a parenthesized expression.

PrimitiveTypeTree

A tree node for a primitive type.

ProvidesTree

A tree node for a 'provides' directive in a module declaration.

RequiresTree

A tree node for a 'requires' directive in a module declaration.

ReturnTree

A tree node for a return statement.

Scope

Interface for determining locally available program elements, such as local variables and imports.

StatementTree

A tree node used as the base class for the different kinds of statements.

SwitchTree

A tree node for a switch statement.

SynchronizedTree

A tree node for a synchronized statement.

ThrowTree

A tree node for a throw statement.

Tree

Common interface for all nodes in an abstract syntax tree.

TreeVisitor<R,​P>

A visitor of trees, in the style of the visitor design pattern.

TryTree

A tree node for a try statement.

TypeCastTree

A tree node for a type cast expression.

TypeParameterTree

A tree node for a type parameter.

UnaryTree

A tree node for postfix and unary expressions.

UnionTypeTree

A tree node for a union type expression in a multicatch variable declaration.

UsesTree

A tree node for a 'uses' directive in a module declaration.

VariableTree

A tree node for a variable declaration.

WhileLoopTree

A tree node for a while loop statement.

WildcardTree

A tree node for a wildcard type argument.

Enum Description
LambdaExpressionTree.BodyKind

Lambda expressions come in two forms: expression lambdas, whose body is an expression, and statement lambdas, whose body is a block

MemberReferenceTree.ReferenceMode

There are two kinds of member references: (i) method references and (ii) constructor references

ModuleTree.ModuleKind

The kind of the module.

Tree.Kind

Enumerates all kinds of trees.

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.compiler/com/sun/source/tree/package-summary.html