本文整理汇总了Java中org.eclipse.jdt.internal.compiler.ASTVisitor类的典型用法代码示例。如果您正苦于以下问题:Java ASTVisitor类的具体用法?Java ASTVisitor怎么用?Java ASTVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ASTVisitor类属于org.eclipse.jdt.internal.compiler包,在下文中一共展示了ASTVisitor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.qualification != null) {
this.qualification.traverse(visitor, scope);
}
if (this.typeArguments != null) {
for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
this.typeArguments[i].traverse(visitor, scope);
}
}
if (this.arguments != null) {
for (int i = 0, argumentLength = this.arguments.length; i < argumentLength; i++)
this.arguments[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:18,代码来源:ExplicitConstructorCall.java
示例2: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
LocalDeclaration[] localDeclarations = this.resources;
for (int i = 0, max = localDeclarations.length; i < max; i++) {
localDeclarations[i].traverse(visitor, this.scope);
}
this.tryBlock.traverse(visitor, this.scope);
if (this.catchArguments != null) {
for (int i = 0, max = this.catchBlocks.length; i < max; i++) {
this.catchArguments[i].traverse(visitor, this.scope);
this.catchBlocks[i].traverse(visitor, this.scope);
}
}
if (this.finallyBlock != null)
this.finallyBlock.traverse(visitor, this.scope);
}
visitor.endVisit(this, blockScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:19,代码来源:TryStatement.java
示例3: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.typeArguments != null) {
for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
this.typeArguments[i].traverse(visitor, scope);
}
}
if (this.type != null) { // enum constant scenario
this.type.traverse(visitor, scope);
}
if (this.arguments != null) {
for (int i = 0, argumentsLength = this.arguments.length; i < argumentsLength; i++)
this.arguments[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:JavadocAllocationExpression.java
示例4: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.enclosingInstance != null)
this.enclosingInstance.traverse(visitor, scope);
if (this.typeArguments != null) {
for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) {
this.typeArguments[i].traverse(visitor, scope);
}
}
if (this.type != null) // case of enum constant
this.type.traverse(visitor, scope);
if (this.arguments != null) {
int argumentsLength = this.arguments.length;
for (int i = 0; i < argumentsLength; i++)
this.arguments[i].traverse(visitor, scope);
}
if (this.anonymousType != null)
this.anonymousType.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:22,代码来源:QualifiedAllocationExpression.java
示例5: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
int dimensionsLength = this.dimensions.length;
this.type.traverse(visitor, scope);
for (int i = 0; i < dimensionsLength; i++) {
Annotation [] annotations = this.annotationsOnDimensions == null ? null : this.annotationsOnDimensions[i];
int annotationsLength = annotations == null ? 0 : annotations.length;
for (int j = 0; j < annotationsLength; j++) {
annotations[j].traverse(visitor, scope);
}
if (this.dimensions[i] != null)
this.dimensions[i].traverse(visitor, scope);
}
if (this.initializer != null)
this.initializer.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:ArrayAllocationExpression.java
示例6: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.initializations != null) {
int initializationsLength = this.initializations.length;
for (int i = 0; i < initializationsLength; i++)
this.initializations[i].traverse(visitor, this.scope);
}
if (this.condition != null)
this.condition.traverse(visitor, this.scope);
if (this.increments != null) {
int incrementsLength = this.increments.length;
for (int i = 0; i < incrementsLength; i++)
this.increments[i].traverse(visitor, this.scope);
}
if (this.action != null)
this.action.traverse(visitor, this.scope);
}
visitor.endVisit(this, blockScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:26,代码来源:ForStatement.java
示例7: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, MethodScope scope) {
if (visitor.visit(this, scope)) {
if (this.javadoc != null) {
this.javadoc.traverse(visitor, scope);
}
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, scope);
}
if (this.type != null) {
this.type.traverse(visitor, scope);
}
if (this.initialization != null)
this.initialization.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:FieldDeclaration.java
示例8: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(
ASTVisitor visitor,
ClassScope classScope) {
if (visitor.visit(this, classScope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, this.scope);
}
if (this.returnType != null) {
this.returnType.traverse(visitor, this.scope);
}
if (this.defaultValue != null) {
this.defaultValue.traverse(visitor, this.scope);
}
}
visitor.endVisit(this, classScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:20,代码来源:AnnotationMethodDeclaration.java
示例9: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
int annotationsLevels = this.annotations.length;
for (int i = 0; i < annotationsLevels; i++) {
int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
for (int j = 0; j < annotationsLength; j++)
this.annotations[i][j].traverse(visitor, scope);
}
}
if (this.annotationsOnDimensions != null) {
for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
Annotation[] annotations2 = this.annotationsOnDimensions[i];
for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) {
Annotation annotation = annotations2[j];
annotation.traverse(visitor, scope);
}
}
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:ArrayQualifiedTypeReference.java
示例10: findVisits
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
static List<Class<?>> findVisits() {
List<Class<?>> visits = Lists.newArrayList();
for (Method m : ASTVisitor.class.getMethods()) {
if (m.getName().equals("visit") && m.getParameterTypes().length > 0) {
Class<?> t = m.getParameterTypes()[0];
if (!visits.contains(t) && !t.getSimpleName().startsWith("Javadoc")) visits.add(t);
}
}
for (Class<?> extra : EXTRA_TYPES) {
if (!visits.contains(extra)) visits.add(extra);
}
return visits;
}
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:16,代码来源:GenerateEcjTreeVisitorCode.java
示例11: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (this.referencesTable == null) {
super.traverse(visitor, scope);
} else {
if (visitor.visit(this, scope)) {
int restart;
for (restart = this.arity - 1;
restart >= 0;
restart--) {
if (!visitor.visit(
this.referencesTable[restart], scope)) {
visitor.endVisit(
this.referencesTable[restart], scope);
break;
}
}
restart++;
// restart now points to the deepest BE for which
// visit returned true, if any
if (restart == 0) {
this.referencesTable[0].left.traverse(visitor, scope);
}
for (int i = restart, end = this.arity;
i < end; i++) {
this.referencesTable[i].right.traverse(visitor, scope);
visitor.endVisit(this.referencesTable[i], scope);
}
this.right.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:33,代码来源:CombinedBinaryExpression.java
示例12: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
this.type.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:MarkerAnnotation.java
示例13: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
for (int i = 0, max = this.typeArguments.length; i < max; i++) {
if (this.typeArguments[i] != null) {
for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) {
this.typeArguments[i][j].traverse(visitor, scope);
}
}
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:13,代码来源:ParameterizedQualifiedTypeReference.java
示例14: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.left.traverse(visitor, scope);
this.right.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:8,代码来源:EqualExpression.java
示例15: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.argument != null) {
this.argument.traverse(visitor, blockScope);
}
}
visitor.endVisit(this, blockScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:JavadocArgumentExpression.java
示例16: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
this.type.traverse(visitor, scope);
}
if (this.bounds != null) {
int boundsLength = this.bounds.length;
for (int i = 0; i < boundsLength; i++) {
this.bounds[i].traverse(visitor, scope);
}
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:15,代码来源:TypeParameter.java
示例17: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.bound != null) {
this.bound.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:9,代码来源:Wildcard.java
示例18: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.receiver != null) {
this.receiver.traverse(visitor, scope);
}
if (this.arguments != null) {
int argumentsLength = this.arguments.length;
for (int i = 0; i < argumentsLength; i++)
this.arguments[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:14,代码来源:JavadocMessageSend.java
示例19: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(
ASTVisitor visitor,
ClassScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.qualification.traverse(visitor, blockScope);
}
visitor.endVisit(this, blockScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:QualifiedThisReference.java
示例20: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入依赖的package包/类
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.statement != null) this.statement.traverse(visitor, blockScope);
}
visitor.endVisit(this, blockScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:LabeledStatement.java
注:本文中的org.eclipse.jdt.internal.compiler.ASTVisitor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论