package java
Contains the model classes for Java fragments.
Overview
The main trait to identify Java fragments is JavaASTNode.
Examples of interesting nodes in this package are:
- nodes for compilation units (CompilationUnitNode), classes (ClassDeclarationNode), interfaces (InterfaceDeclarationNode), etc.;
- method declarations (MethodDeclarationNode), fields (FieldDeclarationNode), etc.;
- expressions (e.g., BinaryExpressionNode, PrefixOperatorExpressionNode, CastExpressionNode) and operators (OperatorNode);
- structured programming constructs (e.g. ForLoopStatementNode, IfStatementNode, etc.);
- types (ReferenceTypeNode, PrimitiveTypeNode) and identifiers (e.g. QualifiedIdentifierNode, IdentifierNode);
- other terminals (KeywordModifierNode, KeywordNode, etc.)
- Alphabetic
- By Inheritance
- java
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
ASTTerminalNode
extends HASTNode with JavaASTNode
A HAST terminal node.
-
case class
AbsentBodyNode
(comma: SeparatorNode) extends MethodBodyNode with Product with Serializable
A node representing an absent body.
-
trait
AnnotationElement
extends JavaASTNode
An annotation element.
-
case class
AnnotationMethodNode
(returnType: TypeNode, identifier: IdentifierNode, arrayReturnType: Option[ArrayDimensionNode], defaultValue: Option[ElementValueNode], modifiers: Seq[ModifierNode] = Seq(), comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with Product with Serializable
An annotation method declaration.
An annotation method declaration.
- returnType
the return type of the annotation method.
- arrayReturnType
the optional array modifiers at the end of the method as in the old grammar of Java.
- defaultValue
the default value for the annotation method.
-
case class
AnnotationMethodOrConstantNode
(modifiers: Seq[ModifierNode] = Seq(), declarations: Seq[MemberDeclarationNode], comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with Product with Serializable
Boxes a sequence of annotation methods or a constants.
Boxes a sequence of annotation methods or a constants.
- declarations
the declared annotation members.
-
case class
AnnotationNode
(identifier: QualifiedIdentifierNode, element: Option[AnnotationElement], comments: Seq[CommentNode]) extends ModifierNode with Product with Serializable
Represents an annotation declaration.
Represents an annotation declaration.
- identifier
the annotation name
- element
the optional element of this annotation.
-
case class
AnnotationTypeDeclarationNode
(modifiers: Seq[ModifierNode], identifier: IdentifierNode, body: ClassBodyNode, labels: Seq[LabelNode] = Seq(), documentation: Option[JavadocCommentNode] = None, comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with BlockStatementNode with TypeDeclarationNode with Product with Serializable
An annotation type declaration.
An annotation type declaration.
- identifier
the name of the annotation.
- body
the annotation body.
-
case class
ArrayAccessSelectorNode
(baseExpression: ExpressionNode, dimExpression: DimExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
Access with array selector.
Access with array selector.
- baseExpression
an expression identifying the accessee object.
- dimExpression
an array dereference expression.
-
case class
ArrayCreatorNode
(typeArguments: Option[TypeArgumentsNode], creatorType: TypeNode, arrayDepth: Seq[ArrayDimensionNode], initializer: ArrayInitializerNode, comments: Seq[CommentNode] = Seq()) extends CreatorNode with Product with Serializable
An array creation with initializer.
An array creation with initializer.
- arrayDepth
the 'depth' of the array creation, representing the array dimensions.
-
case class
ArrayDimensionNode
(typeAnnotations: Seq[AnnotationNode], comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
Represents a pair of squared brackets in array type definition.
Represents a pair of squared brackets in array type definition.
- typeAnnotations
the sequence of type annotations for the node.
-
case class
ArrayExpressionCreatorNode
(typeArguments: Option[TypeArgumentsNode], creatorType: TypeNode, expressionDepth: Seq[DimExpressionNode], arrayDepth: Seq[ArrayDimensionNode], comments: Seq[CommentNode] = Seq()) extends CreatorNode with Product with Serializable
An array creation with expressions representing the dimensions of the array and corresponding size.
An array creation with expressions representing the dimensions of the array and corresponding size.
- expressionDepth
the sequence of dim expression node representing dimensions and their size.
- arrayDepth
the unbound array depths.
-
case class
ArrayInitializerNode
(inits: Seq[VariableAssignmentNode], comments: Seq[CommentNode]) extends VariableAssignmentNode with Product with Serializable
Represents an initializer for an array.
Represents an initializer for an array.
- inits
the list of variable initializers for each element in the array.
- comments
the comments found in the initializer.
-
case class
ArrayTypeNode
(typeNode: TypeNode, depth: Seq[ArrayDimensionNode] = Seq()) extends ReferenceTypeNode with Product with Serializable
Represents an array type node.
Represents an array type node.
- typeNode
the base type for the array.
- depth
the sequence of array dimension nodes representing the array dimensions.
-
case class
AssertStatementNode
(mainExpression: ExpressionNode, optionalExpression: Option[ExpressionNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
An assertion statement.
An assertion statement.
- mainExpression
the assertion argument.
- optionalExpression
the optional expression provided as a message for the assertion exception.
-
case class
BaseReferenceTypeNode
(ids: Seq[ParameterizedTypeNode], comments: Seq[CommentNode] = Seq()) extends ReferenceTypeNode with Product with Serializable
Represents a reference type node in Java
Represents a reference type node in Java
- ids
the sequence of parameterized type nodes identifying the reference type.
-
case class
BinaryExpressionNode
(operator: OperatorNode, left: ExpressionNode, right: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A binary expression.
A binary expression.
- operator
the binary operator.
- left
the left argument.
- right
the right argument.
-
case class
BlockDeclarationNode
(modifiers: Seq[ModifierNode], block: BlockNode) extends MemberDeclarationNode with Product with Serializable
A block declaration (inside a class, like a static block).
A block declaration (inside a class, like a static block).
- modifiers
a set of modifiers for the block.
- block
the actual block of code.
-
case class
BlockNode
(statements: Seq[BlockStatementNode], labels: Seq[LabelNode], leftComments: Seq[CommentNode], rightComments: Seq[CommentNode]) extends MethodBodyNode with BlockStatementNode with Product with Serializable
A block, that is, a sequence of statements.
A block, that is, a sequence of statements.
- statements
the sequence of statements.
-
trait
BlockStatementNode
extends JavaASTNode
A block statement node.
-
case class
BooleanLiteralNode
(valueRep: String) extends LiteralRepresentationNode with Product with Serializable
A boolean literal.
-
trait
BoundNode
extends JavaASTNode
A node representing type bindings.
-
case class
BreakStatementNode
(identifier: Option[IdentifierNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A break statement.
A break statement.
- identifier
the optional label for the break statement.
-
case class
CastExpressionNode
(types: Seq[TypeNode], argument: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A cast expression.
A cast expression.
- types
a sequence of type nodes representing the cast.
- argument
the argument of the cast expression.
-
case class
CatchClauseNode
(modifiers: Seq[ModifierNode], catchType: CatchTypeNode, identifier: IdentifierNode, block: BlockNode, comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A catch clause.
A catch clause.
- catchType
the exception types.
- identifier
the exception object name.
- block
the catch clause body.
-
case class
CatchTypeNode
(identifiers: Seq[QualifiedIdentifierNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
An exception catch specification.
An exception catch specification.
- identifiers
the exception types to be caught.
-
case class
CharacterLiteralNode
(valueRep: String) extends LiteralRepresentationNode with Product with Serializable
A character literal.
-
case class
ClassBodyNode
(declarations: Seq[MemberDeclarationNode], leftComments: Seq[CommentNode], rightComments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A class body, that is, a sequence of member declarations.
A class body, that is, a sequence of member declarations.
- declarations
the declarations for this class.
-
case class
ClassDeclarationNode
(modifiers: Seq[ModifierNode], identifier: IdentifierNode, typeParameters: Option[TypeParametersNode], superTypes: Option[TypeNode], implementedInterfaces: Option[TypeListNode], body: Option[ClassBodyNode], labels: Seq[LabelNode] = Seq(), documentation: Option[JavadocCommentNode] = None, comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with BlockStatementNode with TypeDeclarationNode with Product with Serializable
A class declaration.
A class declaration.
- identifier
the name of the class.
- typeParameters
optional type parameters for generics.
- superTypes
optional super type.
- implementedInterfaces
the optional set of implemented interfaces.
- body
the optional body of the class (absence likely means an incomplete fragment).
-
case class
ClassLiteralExpressionNode
(aType: TypeNode, arrayDepths: Seq[ArrayDimensionNode], comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A class literal expression.
A class literal expression.
- aType
a class literal.
- arrayDepths
a sequence of array parenthesis representing the array types.
-
case class
ClassRelationshipNode
(typeName: IdentifierNode, superTypeName: IdentifierNode, comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
A super-class relationship fragment, like "MyClass extends MySuperClass".
A super-class relationship fragment, like "MyClass extends MySuperClass".
- typeName
the subject of the relationship.
- superTypeName
the super type of the relationship.
-
case class
CompilationUnitNode
(preamble: Option[CompilationUnitPreambleNode], packageDeclaration: Option[PackageDeclarationNode], imports: Seq[ImportDeclarationNode], typeDeclarations: Seq[MemberDeclarationNode]) extends JavaASTNode with Product with Serializable
A full compilation unit.
A full compilation unit.
- preamble
the optional preamble of the compilation unit.
- packageDeclaration
the optional package declaration.
- imports
the sequence of import declarations.
- typeDeclarations
the types declared in the unit.
-
case class
CompilationUnitPreambleNode
(comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A compilation unit preamble, containing comments before package/imports (e.g.
A compilation unit preamble, containing comments before package/imports (e.g. license info).
- comments
A sequence of comments representing the preamble itself.
-
case class
ConditionalExpressionNode
(condition: ExpressionNode, thenExp: ExpressionNode, elseExp: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A conditional expression.
A conditional expression.
- condition
the expression representing the condition.
- thenExp
the
then
expression- elseExp
the
else
expression
-
case class
ConstructorCreatorNode
(typeArguments: Option[TypeArgumentsNode], creatorType: TypeNode, arguments: Seq[ExpressionNode], classBody: Option[ClassBodyNode], comments: Seq[CommentNode] = Seq()) extends CreatorNode with Product with Serializable
A creator node representing a constructor invocation.
A creator node representing a constructor invocation.
- arguments
the arguments for the constructor invocation.
- classBody
the optional class body, used for creating instances of anonymous classes.
-
case class
ContinueStatementNode
(identifier: Option[IdentifierNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A continue statement.
A continue statement.
- identifier
the optional label for the continue statement.
-
trait
CreatorNode
extends ExpressionNode
A node representing a creation, e.g., a constructor invocation or a new array allocation.
-
case class
DimExpressionNode
(argument: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A dim expression, e.g., an array access.
A dim expression, e.g., an array access.
- argument
the expression identifying the value to access.
-
case class
DoWhileStatementNode
(statement: BlockStatementNode, expression: ExpressionNode, labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A do-while statement.
A do-while statement.
- statement
the body of the loop.
- expression
the expression argument of the do-while statement.
-
case class
ElementValueArrayInitializerNode
(values: Option[ElementValuesNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A special element value for array initializers on annotations.
A special element value for array initializers on annotations.
- values
an optional sequence of element value nodes.
-
case class
ElementValueNode
(value: JavaASTNode) extends AnnotationElement with Product with Serializable
Boxes a generic value for annotations.
-
case class
ElementValuePairNode
(identifier: IdentifierNode, value: ElementValueNode, comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
An element-value pair node for annotations
An element-value pair node for annotations
- identifier
the element on the pair.
- value
a value on the pair.
-
case class
ElementValuePairsNode
(valuePairs: Seq[ElementValuePairNode], comments: Seq[CommentNode]) extends AnnotationElement with Product with Serializable
A sequence of element value pairs.
A sequence of element value pairs.
- valuePairs
the sequence of pairs.
-
case class
ElementValuesNode
(values: Seq[ElementValueNode], comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
A sequence of element values.
A sequence of element values.
- values
the values of this sequence.
-
case class
ElseStatementNode
(statement: BlockStatementNode, labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
An else statement.
An else statement.
- statement
the body of the else statement.
-
case class
EmptyDeclarationNode
(comments: Seq[CommentNode], labels: Seq[LabelNode] = Seq()) extends MemberDeclarationNode with BlockStatementNode with Product with Serializable
An empty declaration node (that is, just a semicolon, sometimes found in classes).
-
case class
EmptyStatementNode
(comma: SeparatorNode, labels: Seq[LabelNode] = Seq()) extends BlockStatementNode with Product with Serializable
An empty statement, as in the Java grammar.
An empty statement, as in the Java grammar.
- comma
the separator representing the empty statement.
-
case class
EnumBodyNode
(members: Seq[MemberDeclarationNode], leftComments: Seq[CommentNode], rightComments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A enum body.
-
case class
EnumConstantNode
(modifiers: Seq[AnnotationNode], identifier: IdentifierNode, arguments: Option[ExpressionListNode], documentation: Option[JavadocCommentNode], body: Option[ClassBodyNode], comments: Seq[CommentNode] = Seq()) extends JavaASTNode with MemberDeclarationNode with JavadocDocumentableEntity with Product with Serializable
An enum constant.
An enum constant.
- identifier
the enum name identifier.
- arguments
otpional arguments for the enum constant.
-
case class
EnumDeclarationNode
(modifiers: Seq[ModifierNode], identifier: IdentifierNode, superTypes: Option[TypeListNode], body: EnumBodyNode, labels: Seq[LabelNode] = Seq(), documentation: Option[JavadocCommentNode] = None, comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with BlockStatementNode with TypeDeclarationNode with Product with Serializable
An enum declaration.
An enum declaration.
- identifier
the name of the enum.
- superTypes
the optional super type for this enum.
- body
the enum body.
-
case class
ExpressionListNode
(arguments: Seq[ExpressionNode], comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
An expression list.
An expression list.
- arguments
a sequence of expressions.
-
trait
ExpressionNode
extends JavaASTNode
Represents an expression in Java.
-
case class
ExpressionStatement
(expression: ExpressionNode, labels: Seq[LabelNode] = Seq()) extends BlockStatementNode with Product with Serializable
A generic expression as a statement.
A generic expression as a statement.
- expression
the expression.
-
case class
ExtendsTypeBoundNode
(types: Seq[ReferenceTypeNode], comments: Seq[CommentNode]) extends BoundNode with Product with Serializable
An upper bound (i.e.,'extends' bound) specifying implemented interfaces/classes for a type.
An upper bound (i.e.,'extends' bound) specifying implemented interfaces/classes for a type.
- types
the list of reference type nodes representing the implemented interfaces / extended classes for the bound.
-
case class
FieldDeclarationNode
(modifiers: Seq[ModifierNode], variables: Seq[VariableDeclarationNode], documentation: Option[JavadocCommentNode] = None, comments: Seq[CommentNode]) extends MemberDeclarationNode with JavadocDocumentableEntity with Product with Serializable
A field declaration node.
A field declaration node.
- variables
the list of fields in this declaration.
-
case class
FloatingPointLiteralNode
(valueRep: String) extends LiteralRepresentationNode with Product with Serializable
A floating point literal.
-
trait
ForControlNode
extends JavaASTNode
A node representing a
A node representing a
for
control.
for }}}
-
case class
ForEachControlNode
(variable: LocalVariableDeclarationStatementNode, expression: ExpressionNode, comments: Seq[CommentNode]) extends ForControlNode with Product with Serializable
A
A
for
control node in the case of implicit iteration (i.e., a foreach statement).
for }}}
- variable
the local variable declaration.
- expression
the expression identifying the iterable entity.
-
case class
ForExpressionControlNode
(init: Seq[ExpressionNode], condition: Option[ExpressionNode], update: Seq[ExpressionNode], comments: Seq[CommentNode]) extends ForControlNode with Product with Serializable
A
A
for
expression control node.
for }}}
- init
a sequence of expressions that initialize the control variables.
- condition
optional condition for loop termination.
- update
sequence of update expressions.
-
case class
ForLoopStatementNode
(forControl: ForControlNode, statement: BlockStatementNode, labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A for loop statement.
A for loop statement.
- forControl
a for control block.
- statement
the body of the for loop.
-
case class
ForVarControlNode
(variables: LocalVariableDeclarationStatementNode, condition: Option[ExpressionNode], update: Seq[ExpressionNode], comments: Seq[CommentNode]) extends ForControlNode with Product with Serializable
A
A
for
control node with internal variable declaration.
for }}}
- variables
a sequence of local variable declarations.
- condition
optional condition for loop termination.
- update
sequence of update expressions.
-
case class
FormalParameterDeclNode
(modifiers: Seq[ModifierNode], parameterType: TypeNode, variableDeclaration: VariableDeclarationNode, isVariadic: Boolean, comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
Represents a formal parameter declaration.
Represents a formal parameter declaration.
- modifiers
the sequence of modifier nodes (e.g., annotations) for the formal parameter.
- parameterType
the type of the formal parameter.
- variableDeclaration
the corresponding variable declaration and assignment for the parameter.
- isVariadic
true
iff the parameter is variadic.- comments
the comments bound to the declaration.
-
case class
FormalParametersNode
(parameters: Seq[FormalParameterDeclNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
Represents a list of formal parameter declarations (e.g., for a method).
Represents a list of formal parameter declarations (e.g., for a method).
- parameters
the sequence of formal parameter declarations.
- comments
the comments found on the parentheses.
-
case class
IdentifierNode
(name: String, comments: Seq[CommentNode]) extends ASTTerminalNode with Product with Serializable
An identifier node in the HAST.
-
case class
IdentifierWithNonWildCardTypeArgumentNode
(identifier: IdentifierNode, typeArgs: Option[TypeArgumentsNode], comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A special kind of identifier with non-wildcard type arguments.
A special kind of identifier with non-wildcard type arguments.
- identifier
an identifier.
- typeArgs
the type arguments.
-
case class
IfStatementNode
(expression: ExpressionNode, statement: BlockStatementNode, elseStatement: Option[ElseStatementNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
An if statement
An if statement
- expression
the argument of the conditional statement.
- statement
the body of the conditional statement.
- elseStatement
the optional else statement.
-
case class
ImportDeclarationNode
(identifier: QualifiedIdentifierNode, isStatic: Boolean, isOnDemand: Boolean, leftComments: Seq[CommentNode], rightComments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
An import declaration node.
An import declaration node.
- identifier
the imported qualified name.
- isStatic
true
iff the import is static.
-
case class
InnerConstructorInvocationSelectorNode
(identifier: QualifiedIdentifierNode, innerCreator: CreatorNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
An constructor invocation with a prefix selector.
An constructor invocation with a prefix selector.
- identifier
the selector for the constructor/creator invocation.
- innerCreator
the inner constructor/creator invocation.
-
case class
IntegerLiteralNode
(valueRep: String) extends LiteralRepresentationNode with Product with Serializable
An integer literal.
-
case class
InterfaceDeclarationNode
(modifiers: Seq[ModifierNode], identifier: IdentifierNode, typeParameters: Option[TypeParametersNode], superTypes: Option[TypeListNode], body: Option[ClassBodyNode], labels: Seq[LabelNode] = Seq(), documentation: Option[JavadocCommentNode] = None, comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with BlockStatementNode with TypeDeclarationNode with Product with Serializable
An interface declaration.
An interface declaration.
- identifier
the name of the interface.
- typeParameters
optional type parameters for generic interfaces.
- superTypes
the super types (inherited interfaces) of this interface.
- body
optional interface body (absence likely means an incomplete fragment).
-
case class
InterfaceRelationshipNode
(typeName: IdentifierNode, superTypeName: IdentifierNode, comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
A interface relationship fragment, like "MyClass implements MySuperClass".
A interface relationship fragment, like "MyClass implements MySuperClass".
- typeName
the subject of the relationship.
- superTypeName
the interface type of the relationship.
-
trait
JavaASTNode
extends HASTNode
A HAST node for Java code fragments.
-
trait
JavadocDocumentableEntity
extends AnyRef
Represents an entity that can hold Javadoc documentation.
Represents an entity that can hold Javadoc documentation.
- Since
2.0.0
-
case class
KeywordModifierNode
(value: KeywordModifiers.Value, comments: Seq[CommentNode]) extends ModifierNode with ASTTerminalNode with Product with Serializable
A modifier keyword node in the HAST.
-
case class
KeywordNode
(value: String, comments: Seq[CommentNode]) extends ASTTerminalNode with Product with Serializable
A keyword node in the HAST.
-
case class
LabelNode
(identifier: IdentifierNode, comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A label for break jumps.
A label for break jumps.
- identifier
a label identifier.
- comments
the comments close to this label, if present.
-
case class
LambdaBodyBlockNode
(blockBody: BlockNode, comments: Seq[CommentNode] = Seq()) extends LambdaBodyNode with Product with Serializable
A lambda body where the body is a block.
A lambda body where the body is a block.
- blockBody
a block representing the body of the lambda.
-
case class
LambdaBodyExpressionNode
(expressionBody: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends LambdaBodyNode with Product with Serializable
A lambda body where the body is an expression.
A lambda body where the body is an expression.
- expressionBody
an expression node representing the body of the lambda.
-
sealed
trait
LambdaBodyNode
extends ExpressionNode
The body of a lambda expression.
-
case class
LambdaExpressionNode
(lambdaParameters: LambdaParametersNode, lambdaBody: LambdaBodyNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A lambda expression node.
A lambda expression node.
- lambdaParameters
the parameters of the lambda expression.
- lambdaBody
the body of the lambda expression.
-
case class
LambdaParametersNode
(parameterList: Either[Seq[IdentifierNode], FormalParametersNode], hasParentheses: Boolean = true, comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
A node representing the parameters of a lambda expression.
A node representing the parameters of a lambda expression.
- parameterList
Either an inferred parameter list, i.e. a list of identifiers, or a formal parameter declarations node.
-
case class
LiteralNode
(node: LiteralRepresentationNode, comments: Seq[CommentNode]) extends ASTTerminalNode with ExpressionNode with Product with Serializable
A node representing a literal with comments.
A node representing a literal with comments.
- node
the specific literal representation.
-
trait
LiteralRepresentationNode
extends JavaASTNode
A trait for nodes with a literal representation.
-
case class
LocalVariableDeclarationStatementNode
(modifiers: Seq[ModifierNode], declarations: Seq[VariableDeclarationNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A local variable declaration.
A local variable declaration.
- declarations
the actual declarations.
-
case class
MemberAccessNode
(identifier: IdentifierNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A member access node (e.g.,
A member access node (e.g.,
.elem
)
.elem }}}
- identifier
the accessed identifier
-
trait
MemberDeclarationNode
extends JavaASTNode
A trait for member declarations (fields, methods, etc.)
A trait for member declarations (fields, methods, etc.)
- See also
-
trait
MethodBodyNode
extends JavaASTNode
Trait representing the body of a method.
-
case class
MethodDeclarationNode
(modifiers: Seq[ModifierNode], typeParameters: Option[TypeParametersNode], returnType: Option[TypeNode], identifier: IdentifierNode, parameters: FormalParametersNode, arrayReturnType: Seq[ArrayDimensionNode], thrownExceptions: Option[ThrownExceptionsNode], body: Option[MethodBodyNode], documentation: Option[JavadocCommentNode] = None, comments: Seq[CommentNode] = Seq()) extends MemberDeclarationNode with JavadocDocumentableEntity with Product with Serializable
A method/constructor declaration node.
A method/constructor declaration node.
Many attributes are optional because this class encloses also partial, incomplete declarations found in fragments.
- modifiers
the modifiers for this method.
- typeParameters
the optional type parameters for this method.
- returnType
the (optional) return type of the method. If not defined, the method is a constructor.
- identifier
the method name.
- parameters
the formal parameter list
- arrayReturnType
the optional array return type found in old java grammar at the end of the method declaration.
- thrownExceptions
optional list of thrown exceptions.
- body
the optional body (implementation) of the method.
- See also
#isConstructor
-
case class
MethodInvocationNode
(qualifiedIdentifier: Option[QualifiedIdentifierNode], typeArgument: Option[TypeArgumentsNode], identifier: IdentifierNode, arguments: Seq[ExpressionNode], comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A method invocation.
A method invocation.
- qualifiedIdentifier
the identifier representing the entity on which the method is invoked.
- typeArgument
optional type arguments for the method.
- identifier
the method name.
-
case class
MethodReferenceNode
(prefix: Either[TypeNode, ExpressionNode], typeArguments: Option[TypeArgumentsNode], identifier: Option[IdentifierNode], comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
Represents a method reference expression.
Represents a method reference expression.
A method reference is represented by a simple or qualified name, followed by
::
, followed by an identifier (or
new
).
new }}}
:: }}} followed by an identifier (or
new
).
new }}}
- prefix
either a type node or an expression node, identifying the binding for the method reference.
- typeArguments
optional type arguments for the method reference.
- identifier
optional identifier node identifying the method name, if
false
-
case class
MissingExpressionNode
(comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A
hole
expression, that is, a missing (expected) expression used in code snippets, tutorials, etc. -
trait
ModifierNode
extends JavaASTNode
A node representing a modifier.
-
case class
NullLiteralNode
() extends LiteralRepresentationNode with Product with Serializable
The null literal.
-
case class
OperatorNode
(symbol: String, comments: Seq[CommentNode]) extends ASTTerminalNode with Product with Serializable
A specific operator node in the HAST, used for specific nodes that hold or require the operator (e.g.
A specific operator node in the HAST, used for specific nodes that hold or require the operator (e.g. expressions).
-
case class
PackageDeclarationNode
(annotations: Seq[AnnotationNode], identifier: QualifiedIdentifierNode, documentation: Option[JavadocCommentNode] = None, leftComments: Seq[CommentNode], rightComments: Seq[CommentNode]) extends JavaASTNode with JavadocDocumentableEntity with Product with Serializable
A package declaration.
A package declaration.
- annotations
the optional annotations for this package.
- identifier
the fully qualified package name.
-
case class
ParameterizedTypeNode
(identifier: IdentifierNode, annotations: Seq[AnnotationNode], typeArguments: Option[TypeArgumentsNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A parameterized type node, that is, an identifier with type annotations and type arguments.
A parameterized type node, that is, an identifier with type annotations and type arguments.
- identifier
the simple name for the type.
- annotations
the type annotations for the type.
- typeArguments
the type arguments for the type (generics).
-
case class
PostfixOperatorExpressionNode
(argument: ExpressionNode, operator: OperatorNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A postfix operator expression (e.g.,
A postfix operator expression (e.g.,
i++
).
i++ }}}
- argument
the argument of the postfix expression.
- operator
the node representing the operator.
-
case class
PrefixOperatorExpressionNode
(operator: OperatorNode, argument: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
A prefix operator expression node (e.g., --p).
A prefix operator expression node (e.g., --p).
- operator
the node representing the operator.
- argument
the argument of the prefix expression.
-
case class
PrimitiveTypeNode
(primitiveType: PrimitiveType, typeAnnotations: Seq[AnnotationNode], comments: Seq[CommentNode] = Seq()) extends TypeNode with ASTTerminalNode with Product with Serializable
Represents a Java basic (primitive) type.
Represents a Java basic (primitive) type.
- typeAnnotations
the type annotations for the primitive type.
-
case class
QualifiedIdentifierNode
(identifiers: Seq[IdentifierNode], comments: Seq[CommentNode]) extends ExpressionNode with Product with Serializable
A qualified identifier.
A qualified identifier.
- identifiers
the sequence of identifiers for the qualified identifier.
-
case class
ReferenceTypeBoxedExpression
(referenceType: ReferenceTypeNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
Boxed reference type expression.
Boxed reference type expression.
- referenceType
a reference type.
-
trait
ReferenceTypeNode
extends TypeNode
A reference type node according to Java 8 grammar.
A reference type node according to Java 8 grammar.
A reference type node, according to Java 8 grammar, can be a base reference type node, or an array type node, which in turn is an array type of a base reference type node or a primitive type.
-
case class
ResourceNode
(modifiers: Seq[ModifierNode], declaration: VariableDeclarationNode, expression: ExpressionNode, comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A single resource specification.
A single resource specification.
- declaration
a variable declaration representing the resource.
- expression
the expression representing the value of the resource.
-
case class
ResourceSpecificationNode
(resources: Seq[ResourceNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A full resource specification, that is, a sequence of resource nodes.
A full resource specification, that is, a sequence of resource nodes.
- resources
the sequence of specified resources.
-
case class
ReturnStatementNode
(expression: Option[ExpressionNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A return statement.
A return statement.
- expression
the optional returned expression.
-
case class
SeparatorNode
(symbol: String, comments: Seq[CommentNode]) extends ASTTerminalNode with Product with Serializable
A specific separator node in the HAST, used for specific nodes that hold just the separator.
-
case class
StringLiteralNode
(valueRep: String, embeddedContents: Option[EmbeddedContentsNode] = None) extends LiteralRepresentationNode with EmbeddedContentsProvider with Product with Serializable
A string literal.
A string literal.
- See also
-
case class
SuperTypeBoundNode
(referenceType: ReferenceTypeNode, comments: Seq[CommentNode] = Seq()) extends BoundNode with Product with Serializable
A lower bound (i.e., 'super') type bound.
A lower bound (i.e., 'super') type bound.
- referenceType
the specified lower bound type.
-
case class
SwitchBlockStatementGroupNode
(labels: Seq[SwitchLabelNode], statements: Seq[BlockStatementNode]) extends JavaASTNode with Product with Serializable
A block on a switch statement.
A block on a switch statement.
- labels
the labels for the block.
- statements
the sequence of statements for the block.
-
case class
SwitchDefaultLabel
(comments: Seq[CommentNode]) extends SwitchLabelNode with Product with Serializable
A default case for a case statement.
-
case class
SwitchEnumConstantLabel
(identifier: IdentifierNode, comments: Seq[CommentNode]) extends SwitchLabelNode with Product with Serializable
A switch label in the case of an enum identifier.
-
case class
SwitchExpressionLabel
(expression: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends SwitchLabelNode with Product with Serializable
A switch label as an expression (e.g., string).
-
trait
SwitchLabelNode
extends JavaASTNode
A tagging trait for possible switch labels in switch statements.
-
case class
SwitchStatementNode
(expression: ExpressionNode, statements: Seq[SwitchBlockStatementGroupNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A switch statement.
A switch statement.
- expression
the argument of the switch statement.
- statements
the sequence of block cases.
-
case class
SynchronizedStatementNode
(expression: ExpressionNode, block: BlockNode, labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A synchronized statement.
A synchronized statement.
- expression
the expression of the synchronized statement.
- block
the synchronized block.
-
case class
ThrowStatementNode
(expression: ExpressionNode, labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A throw statement.
A throw statement.
- expression
the optional expression node.
-
case class
ThrownExceptionsNode
(exceptionsIdentifiers: Seq[QualifiedIdentifierNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
A node specifying the thrown exceptions of a method/constructor..
A node specifying the thrown exceptions of a method/constructor..
- exceptionsIdentifiers
the qualified identifier list corresponding to the set of exception types thrown.
-
case class
TryCatchStatementNode
(resourceSpecification: Option[ResourceSpecificationNode], block: BlockNode, catches: Seq[CatchClauseNode], finallyBlock: Option[BlockNode], labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A try-catch-finally statement node.
A try-catch-finally statement node.
- resourceSpecification
optional resource specification as in Java 7 grammar.
- block
the try block.
- catches
the sequence of catch clauses.
- finallyBlock
the optional finally block.
-
case class
TypeArgumentsNode
(types: Seq[TypeNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
Represents a list of type arguments in a declaration.
-
trait
TypeDeclarationNode
extends MemberDeclarationNode with JavadocDocumentableEntity
A tagging trait identifying type declarations.
A tagging trait identifying type declarations.
- Since
2.0.0
-
case class
TypeListNode
(types: Seq[ReferenceTypeNode], comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
A temporary node representing a type list.
A temporary node representing a type list.
- types
the sequence of types.
-
trait
TypeNode
extends JavaASTNode
A node in the AST representing a Java Type.
-
case class
TypeParameterNode
(identifier: IdentifierNode, bound: Option[BoundNode], comments: Seq[CommentNode] = Seq()) extends JavaASTNode with Product with Serializable
A type parameter node.
A type parameter node.
- identifier
the name of the type parameter.
- bound
optional bound for the type parameter.
-
case class
TypeParametersNode
(typeParameters: Seq[TypeParameterNode], comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
Represents a sequence of type parameters.
Represents a sequence of type parameters.
- typeParameters
the sequence of type parameters.
-
case class
UnboundConditionalExpressionNode
(thenExpr: ExpressionNode, elseExpr: ExpressionNode, comments: Seq[CommentNode] = Seq()) extends ExpressionNode with Product with Serializable
Intermediate node used during parsing to construct right-associative ternary expressions.
-
sealed
trait
VariableAssignmentNode
extends JavaASTNode
Common trait for variable assignments.
-
case class
VariableDeclarationNode
(identifier: IdentifierNode, arrayDepth: Seq[ArrayDimensionNode], assignment: Option[VariableAssignmentNode], varType: TypeNode = UndefinedTypeNode, comments: Seq[CommentNode]) extends JavaASTNode with Product with Serializable
Represents a variable declaration.
Represents a variable declaration.
- identifier
the name of the variable.
- arrayDepth
the optional sequence of array dimension nodes.
- assignment
the optional assignment node.
- varType
the declared variable type. Can be UndefinedTypeNode
-
case class
VariableExpressionInitializerNode
(expression: ExpressionNode, comments: Seq[CommentNode]) extends VariableAssignmentNode with Product with Serializable
Represents a variable initialization with an expression.
Represents a variable initialization with an expression.
- expression
the value for the initialization.
- comments
the comments found in the initializer.
-
case class
WhileStatementNode
(expression: ExpressionNode, statement: BlockStatementNode, labels: Seq[LabelNode], comments: Seq[CommentNode]) extends BlockStatementNode with Product with Serializable
A while statement.
A while statement.
- expression
the expression argument of the while statement.
- statement
the body of the loop.
-
case class
WildcardTypeArgumentNode
(operator: OperatorNode, typeAnnotations: Seq[AnnotationNode], bound: Option[BoundNode], comments: Seq[CommentNode] = Seq()) extends TypeNode with Product with Serializable
The wil card type argument.
The wil card type argument.
- operator
the corresponding operator node.
- typeAnnotations
the sequence of type annotations for the wildcard.
- bound
the optional bound for the wildcard.
Value Members
- object JavaImplicits
-
object
KeywordModifiers
extends Enumeration
An enumeration for keyword modifiers.
- object LambdaBodyNode
-
object
PrimitiveTypeNode
extends Serializable
Holds the valid values for primitive type nodes.
Holds the valid values for primitive type nodes.
- Since
2.0.0
-
object
QualifiedIdentifierNode
extends Serializable
Module for utility classes representing the qualified identifier parts.
Module for utility classes representing the qualified identifier parts.
- Since
2.0.0
-
object
UndefinedTypeNode
extends TypeNode with Product with Serializable
A node representing an undefined type.