org.eclipse.jdt.internal.compiler.ast.Annotation.isTypeUseCompatible()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(12.1k)|赞(0)|评价(0)|浏览(101)

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

Annotation.isTypeUseCompatible介绍

暂无

代码示例

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

SourceTypeBinding sourceType = (SourceTypeBinding) methodBinding.declaringClass;
MethodDeclaration methodDecl = (MethodDeclaration) sourceType.scope.referenceContext.declarationOf(methodBinding);
if (isTypeUseCompatible(methodDecl.returnType, scope)) {
  return AnnotationTargetAllowed.YES;
} else {
SourceTypeBinding sourceType = (SourceTypeBinding) sourceField.declaringClass;
FieldDeclaration fieldDeclaration = sourceType.scope.referenceContext.declarationOf(sourceField);
if (isTypeUseCompatible(fieldDeclaration.type, scope)) {
  return AnnotationTargetAllowed.YES;
} else {
  return AnnotationTargetAllowed.YES;
} else if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
  if (isTypeUseCompatible(localVariableBinding.declaration.type, scope)) {
    return AnnotationTargetAllowed.YES;
  } else {
if (localVariableBinding.declaration.isTypeNameVar(scope)) {
  return AnnotationTargetAllowed.NO;
} else if (isTypeUseCompatible(localVariableBinding.declaration.type, scope)) {
  return AnnotationTargetAllowed.YES;
} else {

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

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

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

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

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

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

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

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

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

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

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

public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
  if (this.binding == null) {
    // for default constructors and fake implementation of abstract methods 
    this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
  } else if (!this.binding.type.isValidBinding()) {
    AbstractMethodDeclaration methodDecl = scope.referenceMethod();
    if (methodDecl != null) {
      MethodBinding methodBinding = methodDecl.binding;
      if (methodBinding != null) {
        methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
      }
    }
  }
  if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
    resolveAnnotations(scope, this.annotations, this.binding, true);
    if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
      Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
      scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
    }
  }
  this.binding.declaration = this;
  return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
}

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

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (this.type.resolvedType != null && this.type.resolvedType.hasNullTypeAnnotations()) {
  scope.problemReporter().nullAnnotationUnsupportedLocation(this.type);

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (this.type.resolvedType != null && this.type.resolvedType.hasNullTypeAnnotations()) {
  scope.problemReporter().nullAnnotationUnsupportedLocation(this.type);

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (this.type.resolvedType != null && this.type.resolvedType.hasNullTypeAnnotations()) {
  scope.problemReporter().nullAnnotationUnsupportedLocation(this.type);

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

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled && 
    (this.type.hasNullTypeAnnotation(AnnotationPosition.ANY) || TypeReference.containsNullAnnotation(this.annotations)))

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

Annotation.isTypeUseCompatible(fieldDecl.type, this.scope, annotations);

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

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled && 
    (this.type.hasNullTypeAnnotation(AnnotationPosition.ANY) || TypeReference.containsNullAnnotation(this.annotations)))

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

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled && 
    (this.type.hasNullTypeAnnotation(AnnotationPosition.ANY) || TypeReference.containsNullAnnotation(this.annotations)))

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

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled && 
    (this.type.hasNullTypeAnnotation(AnnotationPosition.ANY) || TypeReference.containsNullAnnotation(this.annotations)))

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

Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled && 
    (this.type.hasNullTypeAnnotation(AnnotationPosition.ANY) || TypeReference.containsNullAnnotation(this.annotations)))

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

Annotation.isTypeUseCompatible(fieldDecl.type, this.scope, annotations);

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

Annotation.isTypeUseCompatible(fieldDecl.type, this.scope, annotations);

相关文章