本文整理了Java中org.eclipse.jdt.core.dom.Annotation.resolveAnnotationBinding()
方法的一些代码示例,展示了Annotation.resolveAnnotationBinding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.resolveAnnotationBinding()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.dom.Annotation
类名称:Annotation
方法名:resolveAnnotationBinding
[英]Resolves and returns the resolved annotation for this annotation.
Note that bindings (which includes resolved annotations) are generally unavailable unless requested when the AST is being built.
[中]解析并返回此批注的已解析批注。
请注意,除非在生成AST时请求,否则绑定(包括已解析的注释)通常不可用。
代码示例来源:origin: mono/sharpen
private boolean isIgnoredAnnotation(Annotation m) {
return _configuration.isIgnoredAnnotation(qualifiedName(m.resolveAnnotationBinding().getAnnotationType()));
}
代码示例来源:origin: eclipse/eclipse.jdt.ls
private static boolean isPureTypeAnnotation(Annotation annotation) {
IAnnotationBinding binding= annotation.resolveAnnotationBinding();
if (binding == null) {
return false;
}
IAnnotationBinding targetAnnotationBinding= findTargetAnnotation(binding.getAnnotationType().getAnnotations());
if (targetAnnotationBinding == null) {
return false;
}
return isTypeUseOnly(targetAnnotationBinding);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private static boolean isPureTypeAnnotation(Annotation annotation) {
IAnnotationBinding binding= annotation.resolveAnnotationBinding();
if (binding == null) {
return false;
}
IAnnotationBinding targetAnnotationBinding= findTargetAnnotation(binding.getAnnotationType().getAnnotations());
if (targetAnnotationBinding == null) {
return false;
}
return isTypeUseOnly(targetAnnotationBinding);
}
代码示例来源:origin: cbeust/testng-eclipse
@Override
public boolean visit(MethodDeclaration md) {
if (hasAnnotation(md, "Test")) {
m_testMethods.put(md, getAnnotation(md, "Test"));
}
if ((md.getModifiers() & Modifier.PUBLIC) != 0) {
@SuppressWarnings("unchecked")
boolean hasTestNGAnnotation = false;
List<IExtendedModifier> modifiers = md.modifiers();
for (IExtendedModifier m : modifiers) {
if (m.isAnnotation()) {
Annotation a = (Annotation) m;
IAnnotationBinding ab = a.resolveAnnotationBinding();
if (ab == null) {
continue;
}
String typeName = ab.getAnnotationType().getBinaryName();
if (typeName.contains("org.testng")) {
hasTestNGAnnotation = true;
break;
}
}
}
if (! hasTestNGAnnotation) m_publicMethods.add(md);
}
return super.visit(md);
}
代码示例来源:origin: feenkcom/jdt2famix
(Method) importer.topOfContainerStack());
if (namedEntity != null && node.resolveAnnotationBinding() != null) {
AnnotationInstance annotationInstance = importer.createAnnotationInstanceFromAnnotationBinding(namedEntity,
node.resolveAnnotationBinding());
importer.createLightweightSourceAnchor(annotationInstance, node);
for (Object object : fragments) {
if (((VariableDeclarationFragment) object).resolveBinding() != null
&& node.resolveAnnotationBinding() != null) {
Attribute attribute = importer
.ensureAttributeForVariableBinding(((VariableDeclarationFragment) object).resolveBinding());
AnnotationInstance annotationInstance = importer
.createAnnotationInstanceFromAnnotationBinding(attribute, node.resolveAnnotationBinding());
importer.createLightweightSourceAnchor(annotationInstance, node);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
return;
Annotation annotation= (Annotation) selectedNode;
IAnnotationBinding annotationBinding= annotation.resolveAnnotationBinding();
String name= annotationBinding.getName();
if (name.equals(NullAnnotationsFix.getNonNullByDefaultAnnotationName(fCompilationUnit.getJavaElement(), true))) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation
if (extMod.isAnnotation()) {
Annotation annotation= (Annotation) extMod;
IAnnotationBinding annotationBinding= annotation.resolveAnnotationBinding();
if (annotationBinding != null) {
ITypeBinding annotationType= annotationBinding.getAnnotationType();
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
int index=0;
for (Iterator it = annos.iterator(); it.hasNext(); index++) {
result[index] = ((Annotation) it.next()).resolveAnnotationBinding();
代码示例来源:origin: eclipse/eclipse.jdt.ls
if (extMod.isAnnotation()) {
Annotation annotation= (Annotation) extMod;
IAnnotationBinding annotationBinding= annotation.resolveAnnotationBinding();
if (annotationBinding != null) {
ITypeBinding annotationType= annotationBinding.getAnnotationType();
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
int index=0;
for (Iterator it = annos.iterator(); it.hasNext(); index++) {
result[index] = ((Annotation) it.next()).resolveAnnotationBinding();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
int index=0;
for (Iterator it = annos.iterator(); it.hasNext(); index++) {
result[index] = ((Annotation) it.next()).resolveAnnotationBinding();
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
int index=0;
for (Iterator it = annos.iterator(); it.hasNext(); index++) {
result[index] = ((Annotation) it.next()).resolveAnnotationBinding();
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
int index=0;
for (Iterator it = annos.iterator(); it.hasNext(); index++) {
result[index] = ((Annotation) it.next()).resolveAnnotationBinding();
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
int index=0;
for (Iterator it = annos.iterator(); it.hasNext(); index++) {
result[index] = ((Annotation) it.next()).resolveAnnotationBinding();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
case ASTNode.SINGLE_MEMBER_ANNOTATION:
case ASTNode.NORMAL_ANNOTATION:
return ((Annotation) expression).resolveAnnotationBinding();
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation
case ASTNode.SINGLE_MEMBER_ANNOTATION:
case ASTNode.NORMAL_ANNOTATION:
return ((Annotation) expression).resolveAnnotationBinding();
内容来源于网络,如有侵权,请联系作者删除!