Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeBinding


      return false;
    }

    private boolean isUnsafeLongAnnotation(Annotation annot, ClassScope scope) {
      if (annot.type != null) {
        TypeBinding resolved = annot.type.resolveType(scope);
        if (resolved != null) {
          if (resolved instanceof ReferenceBinding) {
            ReferenceBinding rb = (ReferenceBinding) resolved;
            if (CharOperation.equals(rb.compoundName,
                UNSAFE_LONG_ANNOTATION_CHARS)) {
View Full Code Here


        }
      }

      char[][] compoundName = CharOperation.splitOn('.',
          className.toCharArray());
      TypeBinding typeBinding = cud.scope.getType(compoundName,
          compoundName.length);
      if (typeBinding == null) {
        GWTProblem.recordInCud(rescue, cud, notFound(className), null);
      } else if (typeBinding instanceof ProblemReferenceBinding) {
        ProblemReferenceBinding problem = (ProblemReferenceBinding) typeBinding;
View Full Code Here

    return false;
  }

  private boolean isUnsafeLongAnnotation(Annotation annot, ClassScope scope) {
    if (annot.type != null) {
      TypeBinding resolved = annot.type.resolveType(scope);
      if (resolved != null) {
        if (resolved instanceof ReferenceBinding) {
          ReferenceBinding rb = (ReferenceBinding) resolved;
          if (CharOperation.equals(rb.compoundName,
              UNSAFE_LONG_ANNOTATION_CHARS)) {
View Full Code Here

        }
      }

      char[][] compoundName = CharOperation.splitOn('.',
          className.toCharArray());
      TypeBinding typeBinding = cud.scope.getType(compoundName,
          compoundName.length);
      if (typeBinding == null) {
        GWTProblem.recordError(rescue, cud, notFound(className), null);
      } else if (typeBinding instanceof ProblemReferenceBinding) {
        ProblemReferenceBinding problem = (ProblemReferenceBinding) typeBinding;
View Full Code Here

            ReferenceBinding enclosingType = receiverType.enclosingType();
            if (enclosingType == null) {
              scope.problemReporter().unnecessaryEnclosingInstanceSpecification(this.qualification, receiverType);
              this.bits |= ASTNode.DiscardEnclosingInstance;
            } else {
              TypeBinding qTb = this.qualification.resolveTypeExpecting(scope, enclosingType);
              this.qualification.computeConversion(scope, qTb, qTb);
            }
          }
        }
      }
View Full Code Here

  // receiverType can be an array binding in one case... see if you can change it
  if (receiverType instanceof ArrayBinding)
    return false;
  ReferenceBinding type = (ReferenceBinding) receiverType;
  PackageBinding declaringPackage = fieldBinding.declaringClass.fPackage;
  TypeBinding originalDeclaringClass = fieldBinding.declaringClass .original();
  do {
    if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
      if (originalDeclaringClass == type.erasure().original()) return true
    } else {
      if (originalDeclaringClass == type.original()) return true;
View Full Code Here

  // receiverType can be an array binding in one case... see if you can change it
  if (receiverType instanceof ArrayBinding)
    return false;
  ReferenceBinding type = (ReferenceBinding) receiverType;
  PackageBinding declaringPackage = methodBinding.declaringClass.fPackage;
  TypeBinding originalDeclaringClass = methodBinding.declaringClass .original();
  do {
    if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
      if (originalDeclaringClass == type.erasure().original()) return true;
    } else {
      if (originalDeclaringClass == type.original()) return true;
View Full Code Here

public FieldBinding findFieldForCodeSnippet(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite) {
  if (receiverType.isBaseType())
    return null;
  if (receiverType.isArrayType()) {
    TypeBinding leafType = receiverType.leafComponentType();
    if (leafType instanceof ReferenceBinding)
    if (!((ReferenceBinding)leafType).canBeSeenBy(this)) {
      return new ProblemFieldBinding((ReferenceBinding)leafType, fieldName, ProblemReasons.ReceiverTypeNotVisible);
    }
    if (CharOperation.equals(fieldName, TypeConstants.LENGTH))
View Full Code Here

  }
 
  public TypeBinding resolveType(BlockScope scope) {
    // implicit this
    this.constant = Constant.NotAConstant;
    TypeBinding snippetType = null;
    MethodScope methodScope = scope.methodScope();
    if (!this.isImplicit && !checkAccess(methodScope)) {
      return null;
    }
    snippetType = scope.enclosingSourceType();
View Full Code Here

  public void resolve(BlockScope upperScope) {
    // use the scope that will hold the init declarations
    this.scope = new BlockScope(upperScope);
    this.elementVariable.resolve(this.scope); // collection expression can see itemVariable
    TypeBinding elementType = this.elementVariable.type.resolvedType;
    TypeBinding collectionType = this.collection == null ? null : this.collection.resolveType(this.scope);

    TypeBinding expectedCollectionType = null;
    if (elementType != null && collectionType != null) {
      boolean isTargetJsr14 = this.scope.compilerOptions().targetJDK == ClassFileConstants.JDK1_4;
      if (collectionType.isArrayType()) { // for(E e : E[])
        this.kind = ARRAY;
        this.collectionElementType = ((ArrayBinding) collectionType).elementsType();
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.lookup.TypeBinding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.