本文整理了Java中org.eclipse.jdt.internal.compiler.ast.Annotation.getCompilerAnnotation()
方法的一些代码示例,展示了Annotation.getCompilerAnnotation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.getCompilerAnnotation()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.ast.Annotation
类名称:Annotation
方法名:getCompilerAnnotation
暂无
代码示例来源:origin: org.eclipse.scout.sdk/org.eclipse.scout.sdk.core
private boolean internalVisit(Annotation annotation) {
if (annotation.getCompilerAnnotation() == m_binding) {
m_result = annotation;
}
return m_result == null;
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) {
Object oldNode = this.newAstToOldAst.get(domASTNode);
if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode =
(org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode;
IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation());
if (domAnnotation == null)
return null;
this.bindingsToAstNodes.put(domAnnotation, domASTNode);
return domAnnotation;
}
return null;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) {
Object oldNode = this.newAstToOldAst.get(domASTNode);
if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode =
(org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode;
IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation());
if (domAnnotation == null)
return null;
this.bindingsToAstNodes.put(domAnnotation, domASTNode);
return domAnnotation;
}
return null;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) {
Object oldNode = this.newAstToOldAst.get(domASTNode);
if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode =
(org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode;
IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation());
if (domAnnotation == null)
return null;
this.bindingsToAstNodes.put(domAnnotation, domASTNode);
return domAnnotation;
}
return null;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) {
Object oldNode = this.newAstToOldAst.get(domASTNode);
if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode =
(org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode;
IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation());
if (domAnnotation == null)
return null;
this.bindingsToAstNodes.put(domAnnotation, domASTNode);
return domAnnotation;
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) {
Object oldNode = this.newAstToOldAst.get(domASTNode);
if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode =
(org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode;
IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation());
if (domAnnotation == null)
return null;
this.bindingsToAstNodes.put(domAnnotation, domASTNode);
return domAnnotation;
}
return null;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) {
Object oldNode = this.newAstToOldAst.get(domASTNode);
if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) {
org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode =
(org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode;
IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation());
if (domAnnotation == null)
return null;
this.bindingsToAstNodes.put(domAnnotation, domASTNode);
return domAnnotation;
}
return null;
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
private static Annotation findAnnotation(Annotation elementAnnotation, AnnotationBinding annotationBinding) {
if (annotationBinding == elementAnnotation.getCompilerAnnotation()) {
return elementAnnotation;
}
MemberValuePair[] memberValuePairs = elementAnnotation.memberValuePairs();
for (MemberValuePair mvp : memberValuePairs) {
Expression v = mvp.value;
if (v instanceof Annotation) {
Annotation a = findAnnotation((Annotation) v, annotationBinding);
if (a != null) {
return a;
}
} else if (v instanceof ArrayInitializer) {
Expression[] expressions = ((ArrayInitializer) v).expressions;
for (Expression e : expressions) {
if (e instanceof Annotation) {
Annotation a = findAnnotation((Annotation) e, annotationBinding);
if (a != null) {
return a;
}
}
}
}
}
return null;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.compiler.apt
private static Annotation findAnnotation(Annotation elementAnnotation, AnnotationBinding annotationBinding) {
if (annotationBinding == elementAnnotation.getCompilerAnnotation()) {
return elementAnnotation;
}
MemberValuePair[] memberValuePairs = elementAnnotation.memberValuePairs();
for (MemberValuePair mvp : memberValuePairs) {
Expression v = mvp.value;
if (v instanceof Annotation) {
Annotation a = findAnnotation((Annotation) v, annotationBinding);
if (a != null) {
return a;
}
} else if (v instanceof ArrayInitializer) {
Expression[] expressions = ((ArrayInitializer) v).expressions;
for (Expression e : expressions) {
if (e instanceof Annotation) {
Annotation a = findAnnotation((Annotation) e, annotationBinding);
if (a != null) {
return a;
}
}
}
}
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
private static Annotation findAnnotation(Annotation elementAnnotation, AnnotationBinding annotationBinding) {
if (annotationBinding == elementAnnotation.getCompilerAnnotation()) {
return elementAnnotation;
}
MemberValuePair[] memberValuePairs = elementAnnotation.memberValuePairs();
for (MemberValuePair mvp : memberValuePairs) {
Expression v = mvp.value;
if (v instanceof Annotation) {
Annotation a = findAnnotation((Annotation) v, annotationBinding);
if (a != null) {
return a;
}
} else if (v instanceof ArrayInitializer) {
Expression[] expressions = ((ArrayInitializer) v).expressions;
for (Expression e : expressions) {
if (e instanceof Annotation) {
Annotation a = findAnnotation((Annotation) e, annotationBinding);
if (a != null) {
return a;
}
}
}
}
}
return null;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
return ((Annotation) expression).getCompilerAnnotation();
if (expression instanceof ArrayInitializer) {
Expression[] exprs = ((ArrayInitializer) expression).expressions;
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
AnnotationBinding[] annotationBindings = new AnnotationBinding[length];
for (int i = 0; i < length; i++) {
AnnotationBinding compilerAnnotation = annotations[i].getCompilerAnnotation();
if (compilerAnnotation == null) {
return Binding.NO_ANNOTATIONS;
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
return ((Annotation) expression).getCompilerAnnotation();
if (expression instanceof ArrayInitializer) {
Expression[] exprs = ((ArrayInitializer) expression).expressions;
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
return ((Annotation) expression).getCompilerAnnotation();
if (expression instanceof ArrayInitializer) {
Expression[] exprs = ((ArrayInitializer) expression).expressions;
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
return ((Annotation) expression).getCompilerAnnotation();
if (expression instanceof ArrayInitializer) {
Expression[] exprs = ((ArrayInitializer) expression).expressions;
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
return ((Annotation) expression).getCompilerAnnotation();
if (expression instanceof ArrayInitializer) {
Expression[] exprs = ((ArrayInitializer) expression).expressions;
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
AnnotationBinding[] annotationBindings = new AnnotationBinding[length];
for (int i = 0; i < length; i++) {
AnnotationBinding compilerAnnotation = annotations[i].getCompilerAnnotation();
if (compilerAnnotation == null) {
return Binding.NO_ANNOTATIONS;
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
private void resolveAnnotations(
BlockScope scope,
Annotation[] annotations,
Binding currentBinding) {
ASTNode.resolveAnnotations(scope, annotations, currentBinding);
for (Annotation annotation : annotations) {
AnnotationBinding binding = annotation.getCompilerAnnotation();
if (binding != null) { // binding should be resolved, but in case it's not, ignore it
TypeElement anno = (TypeElement)_factory.newElement(binding.getAnnotationType());
Element element = _factory.newElement(currentBinding);
_annoToElement.put(anno, element);
}
}
}
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
private void resolveAnnotations(
BlockScope scope,
Annotation[] annotations,
Binding currentBinding) {
ASTNode.resolveAnnotations(scope, annotations, currentBinding);
for (Annotation annotation : annotations) {
AnnotationBinding binding = annotation.getCompilerAnnotation();
if (binding != null) { // binding should be resolved, but in case it's not, ignore it
TypeElement anno = (TypeElement)_factory.newElement(binding.getAnnotationType());
Element element = _factory.newElement(currentBinding);
_annoToElement.put(anno, element);
}
}
}
}
代码示例来源:origin: org.eclipse.jdt.compiler/apt
private void resolveAnnotations(
BlockScope scope,
Annotation[] annotations,
Binding currentBinding) {
ASTNode.resolveAnnotations(scope, annotations, currentBinding);
for (Annotation annotation : annotations) {
AnnotationBinding binding = annotation.getCompilerAnnotation();
if (binding != null) { // binding should be resolved, but in case it's not, ignore it
TypeElement anno = (TypeElement)_factory.newElement(binding.getAnnotationType());
Element element = _factory.newElement(currentBinding);
_annoToElement.put(anno, element);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!