本文整理了Java中org.eclipse.jdt.internal.compiler.ast.Annotation.traverse()
方法的一些代码示例,展示了Annotation.traverse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.traverse()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.ast.Annotation
类名称:Annotation
方法名:traverse
暂无
代码示例来源:origin: INRIA/spoon
for (Annotation annotation : type.annotations[position]) {
if (scope instanceof ClassScope) {
annotation.traverse(this.jdtTreeBuilder, (ClassScope) scope);
} else if (scope instanceof BlockScope) {
annotation.traverse(this.jdtTreeBuilder, (BlockScope) scope);
} else {
annotation.traverse(this.jdtTreeBuilder, (BlockScope) null);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(this.type, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(this.type, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
/**
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(null, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(this.type, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(this.returnType, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(this.type, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
/**
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
TypeReference fakeReturnType = new SingleTypeReference(this.selector, 0);
fakeReturnType.resolvedType = this.binding.declaringClass;
AnnotationCollector collector = new AnnotationCollector(fakeReturnType, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
Annotation annotation = this.annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
Annotation [] typeAnnotations = this.annotations[0];
for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++)
typeAnnotations[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
Annotation [] typeAnnotations = this.annotations[0];
for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++)
typeAnnotations[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void getAllAnnotationContexts(int targetType, int info, List allAnnotationContexts, Annotation [] se7Annotations) {
AnnotationCollector collector = new AnnotationCollector(this, targetType, info, allAnnotationContexts);
for (int i = 0, length = se7Annotations == null ? 0 : se7Annotations.length; i < length; i++) {
Annotation annotation = se7Annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
this.traverse(collector, (BlockScope) null);
}
/**
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void traverse(ASTVisitor visitor, BlockScope 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);
}
}
}
visitor.endVisit(this, scope);
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public void getAllAnnotationContexts(int targetType, int info, List allAnnotationContexts, Annotation [] se7Annotations) {
AnnotationCollector collector = new AnnotationCollector(this, targetType, info, allAnnotationContexts);
for (int i = 0, length = se7Annotations == null ? 0 : se7Annotations.length; i < length; i++) {
Annotation annotation = se7Annotations[i];
annotation.traverse(collector, (BlockScope) null);
}
this.traverse(collector, (BlockScope) null);
}
/**
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
Annotation [] typeAnnotations = this.annotations[0];
for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++)
typeAnnotations[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
private void traverseWithoutInitializer(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, scope);
}
this.type.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
private void traverseWithoutInitializer(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, scope);
}
this.type.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
private void traverseWithoutInitializer(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, scope);
}
this.type.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, 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);
}
visitor.endVisit(this, scope);
}
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, scope);
}
this.type.traverse(visitor, scope);
if (this.initialization != null)
this.initialization.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
代码示例来源:origin: org.eclipse.scout.sdk/org.eclipse.scout.sdk.core
static MemberValuePair findAnnotationValueDeclaration(BindingAnnotationElementWithJdt a) {
Annotation annotationDeclaration = findAnnotationDeclaration(a.getDeclaringAnnotation());
if (annotationDeclaration == null) {
return null;
}
FindMemberValuePairVisitor v = new FindMemberValuePairVisitor(a.getInternalBinding());
annotationDeclaration.traverse(v, (BlockScope) null);
return v.getResult();
}
内容来源于网络,如有侵权,请联系作者删除!