org.eclipse.jdt.internal.compiler.lookup.Binding.kind()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.9k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.Binding.kind()方法的一些代码示例,展示了Binding.kind()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.kind()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.Binding
类名称:Binding
方法名:kind

Binding.kind介绍

暂无

代码示例

代码示例来源: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.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.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.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.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.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: 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.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.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: 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: 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.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.jetty.orbit/org.eclipse.jdt.core

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
}

代码示例来源: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: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
}

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
  if (this.annotations != null) {
    resolveAnnotations(scope);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
  if (this.annotations != null || scope.environment().usesNullTypeAnnotations()) {
    resolveAnnotations(scope);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
  if (this.annotations != null || scope.environment().usesNullTypeAnnotations()) {
    resolveAnnotations(scope);
  }
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private void internalResolve(Scope scope, boolean staticContext) {
  // detect variable/type name collisions
  if (this.binding != null) {
    Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
    if (existingType != null
        && this.binding != existingType
        && existingType.isValidBinding()
        && (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
      scope.problemReporter().typeHiding(this, existingType);
    }
  }
  if (this.annotations != null || scope.environment().usesNullTypeAnnotations()) {
    resolveAnnotations(scope);
  }
}

相关文章