本文整理了Java中org.eclipse.jdt.internal.compiler.ast.Annotation.isAnnotationTargetAllowed()
方法的一些代码示例,展示了Annotation.isAnnotationTargetAllowed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.isAnnotationTargetAllowed()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.ast.Annotation
类名称:Annotation
方法名:isAnnotationTargetAllowed
暂无
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public static boolean isAnnotationTargetAllowed(BlockScope scope, TypeBinding annotationType, Binding recipient) {
long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) {
return true;
}
return isAnnotationTargetAllowed(recipient, scope, annotationType, recipient.kind(), metaTagBits)==AnnotationTargetAllowed.YES;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public static boolean isAnnotationTargetAllowed(BlockScope scope, TypeBinding annotationType, Binding recipient) {
long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) {
return true;
}
return isAnnotationTargetAllowed(recipient, scope, annotationType, recipient.kind(), metaTagBits);
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public static boolean isAnnotationTargetAllowed(BlockScope scope, TypeBinding annotationType, Binding recipient) {
long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) {
return true;
}
return isAnnotationTargetAllowed(recipient, scope, annotationType, recipient.kind(), metaTagBits);
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public static boolean isAnnotationTargetAllowed(BlockScope scope, TypeBinding annotationType, Binding recipient) {
long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) {
return true;
}
return isAnnotationTargetAllowed(recipient, scope, annotationType, recipient.kind(), metaTagBits)==AnnotationTargetAllowed.YES;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public static boolean isAnnotationTargetAllowed(BlockScope scope, TypeBinding annotationType, Binding recipient) {
long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) {
return true;
}
return isAnnotationTargetAllowed(recipient, scope, annotationType, recipient.kind(), metaTagBits);
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind, Binding recipient, long tagBitsToRevert) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
if (recipient instanceof TypeBinding)
((TypeBinding)recipient).tagBits &= ~tagBitsToRevert;
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind, Binding recipient, long tagBitsToRevert) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
if (recipient instanceof TypeBinding)
((TypeBinding)recipient).tagBits &= ~tagBitsToRevert;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind, Binding recipient, long tagBitsToRevert) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
if (recipient instanceof TypeBinding)
((TypeBinding)recipient).tagBits &= ~tagBitsToRevert;
}
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind()) != AnnotationTargetAllowed.YES) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind()) != AnnotationTargetAllowed.YES) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
// check (meta)target compatibility
if (!repeatingAnnotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind, Binding recipient, long tagBitsToRevert) {
// check (meta)target compatibility
if (!annotationType.isValidBinding()) {
// no need to check annotation usage if missing
return;
}
AnnotationTargetAllowed annotationTargetAllowed = isAnnotationTargetAllowed(annotation, scope, annotationType, kind);
if (annotationTargetAllowed != AnnotationTargetAllowed.YES) {
if(annotationTargetAllowed == AnnotationTargetAllowed.TYPE_ANNOTATION_ON_QUALIFIED_NAME) {
scope.problemReporter().typeAnnotationAtQualifiedName(annotation);
} else {
scope.problemReporter().disallowedTargetForAnnotation(annotation);
}
if (recipient instanceof TypeBinding)
((TypeBinding)recipient).tagBits &= ~tagBitsToRevert;
}
}
内容来源于网络,如有侵权,请联系作者删除!