Example usage for Java org.eclipse.jdt.core.dom AST fields, constructors, methods, implement or subclass
The text is from its open source code.
int | JLS2 Constant for indicating the AST API that handles JLS2. |
int | JLS2_INTERNAL Internal synonym for #JLS2 . |
int | JLS3 Constant for indicating the AST API that handles JLS3. |
int | JLS4 Constant for indicating the AST API that handles JLS4 (aka JLS7). |
int | JLS8 Constant for indicating the AST API that handles JLS8. |
int | JLS10 Constant for indicating the AST API that handles JLS10. |
int | JLS11 Constant for indicating the AST API that handles JLS11. |
int | RESOLVED_BINDINGS |
int | apiLevel Level of AST API supported by this AST. |
long | modificationCount Internal modification count; initially 0; increases monotonically by one or more as the AST is successively modified. |
AST() Creates a new, empty abstract syntax tree using default options. |
CompilationUnit | convertCompilationUnit(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. |
ASTNode | createInstance(Class nodeClass) Creates an unparented node of the given node class (non-abstract subclass of ASTNode ). |
ASTNode | createInstance(int nodeType) Creates an unparented node of the given node type. |
boolean | hasBindingsRecovery() Returns true if the ast tree was created with bindings recovery, false otherwise |
boolean | hasResolvedBindings() Returns true if the ast tree was created with bindings, false otherwise |
boolean | hasStatementsRecovery() Returns true if the ast tree was created with statements recovery, false otherwise |
AnnotationTypeDeclaration | newAnnotationTypeDeclaration() 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. |
AnnotationTypeMemberDeclaration | newAnnotationTypeMemberDeclaration() 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. |
AnonymousClassDeclaration | newAnonymousClassDeclaration() Creates and returns a new unparented anonymous class declaration node owned by this AST. |
ArrayAccess | newArrayAccess() Creates and returns a new unparented array access expression node owned by this AST. |
ArrayCreation | newArrayCreation() Creates and returns a new unparented array creation expression node owned by this AST. |
ArrayInitializer | newArrayInitializer() Creates and returns a new unparented array initializer node owned by this AST. |
ArrayType | newArrayType(Type elementType, int dimensions) Creates and returns a new unparented array type node with the given element type and number of dimensions. |
ArrayType | newArrayType(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. |
AssertStatement | newAssertStatement() Creates a new unparented assert statement node owned by this AST. |
Assignment | newAssignment() Creates and returns a new unparented assignment expression node owned by this AST. |
AST | newAST(int level) Creates a new Java abstract syntax tree (AST) following the specified set of API rules. |
AST | newAST(Map Creates a new Java abstract syntax tree Following option keys are significant:
|
Block | newBlock() Creates an unparented block node owned by this AST, for an empty list of statements. |
BooleanLiteral | newBooleanLiteral(boolean value) Creates and returns a new unparented boolean literal node. |
BreakStatement | newBreakStatement() Creates an unparented break statement node owned by this AST. |
CastExpression | newCastExpression() Creates and returns a new unparented cast expression node owned by this AST. |
CatchClause | newCatchClause() Creates a new unparented catch clause node owned by this AST. |
CharacterLiteral | newCharacterLiteral() Creates and returns a new unparented character literal node. |
ClassInstanceCreation | newClassInstanceCreation() Creates and returns a new unparented class instance creation ("new") expression node owned by this AST. |
CompilationUnit | newCompilationUnit() Creates an unparented compilation unit node owned by this AST. |
ConditionalExpression | newConditionalExpression() Creates and returns a new unparented conditional expression node owned by this AST. |
ConstructorInvocation | newConstructorInvocation() Creates an unparented alternate constructor ("this(...);") invocation statement node owned by this AST. |
ContinueStatement | newContinueStatement() Creates an unparented continue statement node owned by this AST. |
Dimension | newDimension() Creates and returns a new unparented annotatable dimension node (Supported only in JLS8 level). |
DoStatement | newDoStatement() Creates a new unparented do statement node owned by this AST. |
EmptyStatement | newEmptyStatement() Creates a new unparented empty statement node owned by this AST. |
EnhancedForStatement | newEnhancedForStatement() Creates a new unparented enhanced for statement node owned by this AST. |
EnumConstantDeclaration | newEnumConstantDeclaration() Creates an unparented enum constant declaration node owned by this AST. |
EnumDeclaration | newEnumDeclaration() Creates an unparented enum declaration node owned by this AST. |
ExpressionMethodReference | newExpressionMethodReference() Creates an unparented expression method reference node owned by this AST. |
ExpressionStatement | newExpressionStatement(Expression expression) Creates a new unparented expression statement node owned by this AST, for the given expression. |
FieldAccess | newFieldAccess() Creates and returns a new unparented field access expression node owned by this AST. |
FieldDeclaration | newFieldDeclaration(VariableDeclarationFragment fragment) Creates a new unparented field declaration node owned by this AST, for the given variable declaration fragment. |
ForStatement | newForStatement() Creates a new unparented for statement node owned by this AST. |
IfStatement | newIfStatement() Creates a new unparented if statement node owned by this AST. |
ImportDeclaration | newImportDeclaration() Creates an unparented import declaration node owned by this AST. |
InfixExpression | newInfixExpression() Creates and returns a new unparented infix expression node owned by this AST. |
Initializer | newInitializer() Creates an unparented initializer node owned by this AST, with an empty block. |
InstanceofExpression | newInstanceofExpression() Creates and returns a new unparented instanceof expression node owned by this AST. |
Javadoc | newJavadoc() Creates and returns a new doc comment node. |
LabeledStatement | newLabeledStatement() Creates a new unparented labeled statement node owned by this AST. |
LambdaExpression | newLambdaExpression() Creates an unparented lambda expression node owned by this AST. |
MarkerAnnotation | newMarkerAnnotation() Creates and returns a new unparented marker annotation node with an unspecified type name. |
MemberValuePair | newMemberValuePair() Creates and returns a new unparented member value pair node with an unspecified member name and value. |
MethodDeclaration | newMethodDeclaration() Creates an unparented method declaration node owned by this AST. |
MethodInvocation | newMethodInvocation() Creates an unparented method invocation expression node owned by this AST. |
MethodRef | newMethodRef() Creates and returns a new method reference node. |
MethodRefParameter | newMethodRefParameter() Creates and returns a new method reference node. |
Modifier | newModifier(Modifier.ModifierKeyword keyword) Creates and returns a new unparented modifier node for the given modifier. |
List | newModifiers(int flags) Creates and returns a list of new unparented modifier nodes for the given modifier flags. |
Name | newName(String qualifiedName) Creates and returns a new unparented name node for the given name. |
Name | newName(String[] identifiers) Creates and returns a new unparented name node for the given name segments. |
NameQualifiedType | newNameQualifiedType(Name qualifier, SimpleName name) Creates and returns a new unparented name qualified type node with the given qualifier and name. |
NormalAnnotation | newNormalAnnotation() Creates and returns a new unparented normal annotation node with an unspecified type name and an empty list of member value pairs. |
NullLiteral | newNullLiteral() Creates and returns a new unparented null literal node. |
NumberLiteral | newNumberLiteral(String literal) Creates and returns a new unparented number literal node. |
NumberLiteral | newNumberLiteral() Creates and returns a new unparented number literal node. |
PackageDeclaration | newPackageDeclaration() Creates an unparented package declaration node owned by this AST. |
ParameterizedType | newParameterizedType(Type type) Creates and returns a new unparented parameterized type node with the given type and an empty list of type arguments. |
ParenthesizedExpression | newParenthesizedExpression() Creates and returns a new unparented parenthesized expression node owned by this AST. |
PostfixExpression | newPostfixExpression() Creates and returns a new unparented postfix expression node owned by this AST. |
PrefixExpression | newPrefixExpression() Creates and returns a new unparented prefix expression node owned by this AST. |
PrimitiveType | newPrimitiveType(PrimitiveType.Code typeCode) Creates and returns a new unparented primitive type node with the given type code. |
QualifiedName | newQualifiedName(Name qualifier, SimpleName name) Creates and returns a new unparented qualified name node for the given qualifier and simple name child node. |
QualifiedType | newQualifiedType(Type qualifier, SimpleName name) Creates and returns a new unparented qualified type node with the given qualifier type and name. |
ReturnStatement | newReturnStatement() Creates a new unparented return statement node owned by this AST. |
SimpleName | newSimpleName(String identifier) Creates and returns a new unparented simple name node for the given identifier. |
SimpleType | newSimpleType(Name typeName) Creates and returns a new unparented simple type node with the given type name. |
SingleMemberAnnotation | newSingleMemberAnnotation() Creates and returns a new unparented single member annotation node with an unspecified type name and value. |
SingleVariableDeclaration | newSingleVariableDeclaration() Creates an unparented single variable declaration node owned by this AST. |
StringLiteral | newStringLiteral() Creates and returns a new unparented string literal node for the empty string literal. |
SuperConstructorInvocation | newSuperConstructorInvocation() Creates an unparented alternate super constructor ("super(...);") invocation statement node owned by this AST. |
SuperFieldAccess | newSuperFieldAccess() Creates and returns a new unparented super field access expression node owned by this AST. |
SuperMethodInvocation | newSuperMethodInvocation() Creates an unparented "super" method invocation expression node owned by this AST. |
SwitchCase | newSwitchCase() Creates a new unparented switch case statement node owned by this AST. |
SwitchStatement | newSwitchStatement() Creates a new unparented switch statement node owned by this AST. |
SynchronizedStatement | newSynchronizedStatement() Creates a new unparented synchronized statement node owned by this AST. |
TagElement | newTagElement() Creates and returns a new tag element node. |
TextElement | newTextElement() Creates and returns a new text element node. |
ThisExpression | newThisExpression() Creates and returns a new unparented "this" expression node owned by this AST. |
ThrowStatement | newThrowStatement() Creates a new unparented throw statement node owned by this AST. |
TryStatement | newTryStatement() Creates a new unparented try statement node owned by this AST. |
TypeDeclaration | newTypeDeclaration() Creates an unparented class declaration node owned by this AST. |
TypeLiteral | newTypeLiteral() Creates and returns a new unparented type literal expression node owned by this AST. |
TypeParameter | newTypeParameter() Creates and returns a new unparented type parameter type node with an unspecified type variable name and an empty list of type bounds. |
VariableDeclarationExpression | newVariableDeclarationExpression(VariableDeclarationFragment fragment) Creates a new unparented local variable declaration expression node owned by this AST, for the given variable declaration fragment. |
VariableDeclarationFragment | newVariableDeclarationFragment() Creates an unparented variable declaration fragment node owned by this AST. |
VariableDeclarationStatement | newVariableDeclarationStatement(VariableDeclarationFragment fragment) Creates a new unparented local variable declaration statement node owned by this AST, for the given variable declaration fragment. |
WhileStatement | newWhileStatement() Creates a new unparented while statement node owned by this AST. |
WildcardType | newWildcardType() Creates and returns a new unparented wildcard type node with no type bound. |
ITypeBinding | resolveWellKnownType(String name) Returns the type binding for a "well known" type. |
void | setBindingResolver(BindingResolver resolver) Sets the binding resolver for this AST. |
void | setDefaultNodeFlag(int flag) Sets default node flags of new nodes of this AST. |
void | setFlag(int newValue) |
void | setOriginalModificationCount(long count) Set originalModificationCount to the current modification count |