Java org.eclipse.jdt.core.dom AST fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jdt.core.dom AST fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jdt.core.dom AST.

The text is from its open source code.

Field

intJLS2
Constant for indicating the AST API that handles JLS2.
intJLS2_INTERNAL
Internal synonym for #JLS2 .
intJLS3
Constant for indicating the AST API that handles JLS3.
intJLS4
Constant for indicating the AST API that handles JLS4 (aka JLS7).
intJLS8
Constant for indicating the AST API that handles JLS8.
intJLS10
Constant for indicating the AST API that handles JLS10.
intJLS11
Constant for indicating the AST API that handles JLS11.
intRESOLVED_BINDINGS
intapiLevel
Level of AST API supported by this AST.
longmodificationCount
Internal modification count; initially 0; increases monotonically by one or more as the AST is successively modified.

Constructor

AST()
Creates a new, empty abstract syntax tree using default options.

Method

CompilationUnitconvertCompilationUnit(int level, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration, Map options, boolean isResolved, org.eclipse.jdt.internal.core.CompilationUnit workingCopy, int reconcileFlags, IProgressMonitor monitor)
Internal method.
ASTNodecreateInstance(Class nodeClass)
Creates an unparented node of the given node class (non-abstract subclass of ASTNode ).
ASTNodecreateInstance(int nodeType)
Creates an unparented node of the given node type.
booleanhasBindingsRecovery()
Returns true if the ast tree was created with bindings recovery, false otherwise
booleanhasResolvedBindings()
Returns true if the ast tree was created with bindings, false otherwise
booleanhasStatementsRecovery()
Returns true if the ast tree was created with statements recovery, false otherwise
AnnotationTypeDeclarationnewAnnotationTypeDeclaration()
Creates and returns a new unparented annotation type declaration node for an unspecified, but legal, name; no modifiers; no javadoc; and an empty list of member declarations.
AnnotationTypeMemberDeclarationnewAnnotationTypeMemberDeclaration()
Creates and returns a new unparented annotation type member declaration node for an unspecified, but legal, member name and type; no modifiers; no javadoc; and no default value.
AnonymousClassDeclarationnewAnonymousClassDeclaration()
Creates and returns a new unparented anonymous class declaration node owned by this AST.
ArrayAccessnewArrayAccess()
Creates and returns a new unparented array access expression node owned by this AST.
ArrayCreationnewArrayCreation()
Creates and returns a new unparented array creation expression node owned by this AST.
ArrayInitializernewArrayInitializer()
Creates and returns a new unparented array initializer node owned by this AST.
ArrayTypenewArrayType(Type elementType, int dimensions)
Creates and returns a new unparented array type node with the given element type and number of dimensions.
ArrayTypenewArrayType(Type elementType)
Creates and returns a new unparented array type node with the given element type, which cannot be an array type for API levels JLS8 and later.
AssertStatementnewAssertStatement()
Creates a new unparented assert statement node owned by this AST.
AssignmentnewAssignment()
Creates and returns a new unparented assignment expression node owned by this AST.
ASTnewAST(int level)
Creates a new Java abstract syntax tree (AST) following the specified set of API rules.
ASTnewAST(Map options)
Creates a new Java abstract syntax tree Following option keys are significant:
  • "org.eclipse.jdt.core.compiler.source" indicates the api level and source compatibility mode (as per JavaCore) - defaults to 1.3
    • "1.3" means the source code is as per JDK 1.3 and api level #JLS3 .
    • "1.4", "1.5", "1.6", "1.7" "1.8" implies the respective source JDK levels 1.4, 1.5, 1.6, 1.7 and api level #JLS4 .
    • "1.8" implies the respective source JDK level 1.8 and api level #JLS8 .
    • "9", "10", "11", "12" and "13" implies the respective JDK levels 9, 10, 11, 12 and 13 and api levels #JLS9 , #JLS10 , #JLS11 , #JLS12 and #JLS13 .
    • Additional legal values may be added later.
  • "org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures" - indicates whether the preview is enabled or disabled legal values are "enabled" and "disabled" implying preview enabled and disabled respectively.
BlocknewBlock()
Creates an unparented block node owned by this AST, for an empty list of statements.
BooleanLiteralnewBooleanLiteral(boolean value)
Creates and returns a new unparented boolean literal node.
BreakStatementnewBreakStatement()
Creates an unparented break statement node owned by this AST.
CastExpressionnewCastExpression()
Creates and returns a new unparented cast expression node owned by this AST.
CatchClausenewCatchClause()
Creates a new unparented catch clause node owned by this AST.
CharacterLiteralnewCharacterLiteral()
Creates and returns a new unparented character literal node.
ClassInstanceCreationnewClassInstanceCreation()
Creates and returns a new unparented class instance creation ("new") expression node owned by this AST.
CompilationUnitnewCompilationUnit()
Creates an unparented compilation unit node owned by this AST.
ConditionalExpressionnewConditionalExpression()
Creates and returns a new unparented conditional expression node owned by this AST.
ConstructorInvocationnewConstructorInvocation()
Creates an unparented alternate constructor ("this(...);") invocation statement node owned by this AST.
ContinueStatementnewContinueStatement()
Creates an unparented continue statement node owned by this AST.
DimensionnewDimension()
Creates and returns a new unparented annotatable dimension node (Supported only in JLS8 level).
DoStatementnewDoStatement()
Creates a new unparented do statement node owned by this AST.
EmptyStatementnewEmptyStatement()
Creates a new unparented empty statement node owned by this AST.
EnhancedForStatementnewEnhancedForStatement()
Creates a new unparented enhanced for statement node owned by this AST.
EnumConstantDeclarationnewEnumConstantDeclaration()
Creates an unparented enum constant declaration node owned by this AST.
EnumDeclarationnewEnumDeclaration()
Creates an unparented enum declaration node owned by this AST.
ExpressionMethodReferencenewExpressionMethodReference()
Creates an unparented expression method reference node owned by this AST.
ExpressionStatementnewExpressionStatement(Expression expression)
Creates a new unparented expression statement node owned by this AST, for the given expression.
FieldAccessnewFieldAccess()
Creates and returns a new unparented field access expression node owned by this AST.
FieldDeclarationnewFieldDeclaration(VariableDeclarationFragment fragment)
Creates a new unparented field declaration node owned by this AST, for the given variable declaration fragment.
ForStatementnewForStatement()
Creates a new unparented for statement node owned by this AST.
IfStatementnewIfStatement()
Creates a new unparented if statement node owned by this AST.
ImportDeclarationnewImportDeclaration()
Creates an unparented import declaration node owned by this AST.
InfixExpressionnewInfixExpression()
Creates and returns a new unparented infix expression node owned by this AST.
InitializernewInitializer()
Creates an unparented initializer node owned by this AST, with an empty block.
InstanceofExpressionnewInstanceofExpression()
Creates and returns a new unparented instanceof expression node owned by this AST.
JavadocnewJavadoc()
Creates and returns a new doc comment node.
LabeledStatementnewLabeledStatement()
Creates a new unparented labeled statement node owned by this AST.
LambdaExpressionnewLambdaExpression()
Creates an unparented lambda expression node owned by this AST.
MarkerAnnotationnewMarkerAnnotation()
Creates and returns a new unparented marker annotation node with an unspecified type name.
MemberValuePairnewMemberValuePair()
Creates and returns a new unparented member value pair node with an unspecified member name and value.
MethodDeclarationnewMethodDeclaration()
Creates an unparented method declaration node owned by this AST.
MethodInvocationnewMethodInvocation()
Creates an unparented method invocation expression node owned by this AST.
MethodRefnewMethodRef()
Creates and returns a new method reference node.
MethodRefParameternewMethodRefParameter()
Creates and returns a new method reference node.
ModifiernewModifier(Modifier.ModifierKeyword keyword)
Creates and returns a new unparented modifier node for the given modifier.
ListnewModifiers(int flags)
Creates and returns a list of new unparented modifier nodes for the given modifier flags.
NamenewName(String qualifiedName)
Creates and returns a new unparented name node for the given name.
NamenewName(String[] identifiers)
Creates and returns a new unparented name node for the given name segments.
NameQualifiedTypenewNameQualifiedType(Name qualifier, SimpleName name)
Creates and returns a new unparented name qualified type node with the given qualifier and name.
NormalAnnotationnewNormalAnnotation()
Creates and returns a new unparented normal annotation node with an unspecified type name and an empty list of member value pairs.
NullLiteralnewNullLiteral()
Creates and returns a new unparented null literal node.
NumberLiteralnewNumberLiteral(String literal)
Creates and returns a new unparented number literal node.
NumberLiteralnewNumberLiteral()
Creates and returns a new unparented number literal node.
PackageDeclarationnewPackageDeclaration()
Creates an unparented package declaration node owned by this AST.
ParameterizedTypenewParameterizedType(Type type)
Creates and returns a new unparented parameterized type node with the given type and an empty list of type arguments.
ParenthesizedExpressionnewParenthesizedExpression()
Creates and returns a new unparented parenthesized expression node owned by this AST.
PostfixExpressionnewPostfixExpression()
Creates and returns a new unparented postfix expression node owned by this AST.
PrefixExpressionnewPrefixExpression()
Creates and returns a new unparented prefix expression node owned by this AST.
PrimitiveTypenewPrimitiveType(PrimitiveType.Code typeCode)
Creates and returns a new unparented primitive type node with the given type code.
QualifiedNamenewQualifiedName(Name qualifier, SimpleName name)
Creates and returns a new unparented qualified name node for the given qualifier and simple name child node.
QualifiedTypenewQualifiedType(Type qualifier, SimpleName name)
Creates and returns a new unparented qualified type node with the given qualifier type and name.
ReturnStatementnewReturnStatement()
Creates a new unparented return statement node owned by this AST.
SimpleNamenewSimpleName(String identifier)
Creates and returns a new unparented simple name node for the given identifier.
SimpleTypenewSimpleType(Name typeName)
Creates and returns a new unparented simple type node with the given type name.
SingleMemberAnnotationnewSingleMemberAnnotation()
Creates and returns a new unparented single member annotation node with an unspecified type name and value.
SingleVariableDeclarationnewSingleVariableDeclaration()
Creates an unparented single variable declaration node owned by this AST.
StringLiteralnewStringLiteral()
Creates and returns a new unparented string literal node for the empty string literal.
SuperConstructorInvocationnewSuperConstructorInvocation()
Creates an unparented alternate super constructor ("super(...);") invocation statement node owned by this AST.
SuperFieldAccessnewSuperFieldAccess()
Creates and returns a new unparented super field access expression node owned by this AST.
SuperMethodInvocationnewSuperMethodInvocation()
Creates an unparented "super" method invocation expression node owned by this AST.
SwitchCasenewSwitchCase()
Creates a new unparented switch case statement node owned by this AST.
SwitchStatementnewSwitchStatement()
Creates a new unparented switch statement node owned by this AST.
SynchronizedStatementnewSynchronizedStatement()
Creates a new unparented synchronized statement node owned by this AST.
TagElementnewTagElement()
Creates and returns a new tag element node.
TextElementnewTextElement()
Creates and returns a new text element node.
ThisExpressionnewThisExpression()
Creates and returns a new unparented "this" expression node owned by this AST.
ThrowStatementnewThrowStatement()
Creates a new unparented throw statement node owned by this AST.
TryStatementnewTryStatement()
Creates a new unparented try statement node owned by this AST.
TypeDeclarationnewTypeDeclaration()
Creates an unparented class declaration node owned by this AST.
TypeLiteralnewTypeLiteral()
Creates and returns a new unparented type literal expression node owned by this AST.
TypeParameternewTypeParameter()
Creates and returns a new unparented type parameter type node with an unspecified type variable name and an empty list of type bounds.
VariableDeclarationExpressionnewVariableDeclarationExpression(VariableDeclarationFragment fragment)
Creates a new unparented local variable declaration expression node owned by this AST, for the given variable declaration fragment.
VariableDeclarationFragmentnewVariableDeclarationFragment()
Creates an unparented variable declaration fragment node owned by this AST.
VariableDeclarationStatementnewVariableDeclarationStatement(VariableDeclarationFragment fragment)
Creates a new unparented local variable declaration statement node owned by this AST, for the given variable declaration fragment.
WhileStatementnewWhileStatement()
Creates a new unparented while statement node owned by this AST.
WildcardTypenewWildcardType()
Creates and returns a new unparented wildcard type node with no type bound.
ITypeBindingresolveWellKnownType(String name)
Returns the type binding for a "well known" type.
voidsetBindingResolver(BindingResolver resolver)
Sets the binding resolver for this AST.
voidsetDefaultNodeFlag(int flag)
Sets default node flags of new nodes of this AST.
voidsetFlag(int newValue)
voidsetOriginalModificationCount(long count)
Set originalModificationCount to the current modification count