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

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.superclass()


    // check for parameterized interface collisions (when different parameterizations occur)
    ReferenceBinding itsSuperclass = null;
    ReferenceBinding[] interfaces = intersectingTypes;
    ReferenceBinding firstType = intersectingTypes[0];
    if (firstType.isClass()) {
      itsSuperclass = firstType.superclass();
      System.arraycopy(intersectingTypes, 1, interfaces = new ReferenceBinding[typeCount - 1], 0, typeCount - 1);
    }
   
    Map invocations = new HashMap(2);
    nextInterface: for (int i = 0, interfaceCount = interfaces.length; i < interfaceCount; i++) {
View Full Code Here


    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007 avoid secondary errors in case of
    // missing super type for anonymous classes ...
    ReferenceBinding declaringClass = fieldBinding.declaringClass;
    boolean avoidSecondary = declaringClass != null &&
                 declaringClass.isAnonymousType() &&
                 declaringClass.superclass() instanceof MissingTypeBinding;
    if (!avoidSecondary) {
      scope.problemReporter().invalidField(this, this.actualReceiverType);
    }
    if (fieldBinding instanceof ProblemFieldBinding) {
      ProblemFieldBinding problemFieldBinding = (ProblemFieldBinding) fieldBinding;
View Full Code Here

    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007 avoid secondary errors in case of
    // missing super type for anonymous classes ...
    ReferenceBinding declaringClass = this.binding.declaringClass;
    boolean avoidSecondary = declaringClass != null &&
                 declaringClass.isAnonymousType() &&
                 declaringClass.superclass() instanceof MissingTypeBinding;
    if (!avoidSecondary)
      scope.problemReporter().invalidMethod(this, this.binding);
    MethodBinding closestMatch = ((ProblemMethodBinding)this.binding).closestMatch;
    switch (this.binding.problemId()) {
      case ProblemReasons.Ambiguous :
View Full Code Here

      }
      methodScope.isConstructorCall = true;
      ReferenceBinding receiverType = scope.enclosingReceiverType();
      boolean rcvHasError = false;
      if (this.accessMode != ExplicitConstructorCall.This) {
        receiverType = receiverType.superclass();
        TypeReference superclassRef = scope.referenceType().superclass;
        if (superclassRef != null && superclassRef.resolvedType != null && !superclassRef.resolvedType.isValidBinding()) {
          rcvHasError = true;
        }
      }
View Full Code Here

      return null;
    if (enclosingReceiverType.id == T_JavaLangObject) {
      scope.problemReporter().cannotUseSuperInJavaLangObject(this);
      return null;
    }
    return this.resolvedType = enclosingReceiverType.superclass();
  }

  public void traverse(ASTVisitor visitor, BlockScope blockScope) {
    visitor.visit(this, blockScope);
    visitor.endVisit(this, blockScope);
View Full Code Here

    ReferenceBinding binding = (ReferenceBinding) typeBinding;
    while (binding != null) {
      if (JSO_CLASS.equals(String.valueOf(binding.constantPoolName()))) {
        return true;
      }
      binding = binding.superclass();
    }
    return false;
  }

  /**
 
View Full Code Here

  public static boolean isJsoSubclass(TypeBinding typeBinding) {
    if (!(typeBinding instanceof ReferenceBinding)) {
      return false;
    }
    ReferenceBinding binding = (ReferenceBinding) typeBinding;
    return isJso(binding.superclass());
  }

  static String errAlreadyImplemented(String intfName, String impl1,
      String impl2) {
    return "Only one JavaScriptObject type may implement the methods of an "
View Full Code Here

        hasPotentialDefaultAbstractMethods = false;
      }
      if(currentType.isParameterizedType()) {
        currentType = ((ParameterizedTypeBinding)currentType).genericType().superclass();
      } else {
        currentType = currentType.superclass();
      }
    }
  }
  private void searchVisibleVariablesAndMethods(
      Scope scope,
View Full Code Here

      if (TypeBinding.equalsEquals(originalDeclaringClass, type.erasure().original())) return true
    } else {
      if (TypeBinding.equalsEquals(originalDeclaringClass, type.original())) return true;
    }
    if (declaringPackage != type.fPackage) return false;
  } while ((type = type.superclass()) != null);
  return false;
}
/* Answer true if the receiver is visible to the type provided by the scope.
* InvocationSite implements isSuperAccess() to provide additional information
* if the receiver is protected.
View Full Code Here

      if (TypeBinding.equalsEquals(originalDeclaringClass, type.erasure().original())) return true;
    } else {
      if (TypeBinding.equalsEquals(originalDeclaringClass, type.original())) return true;
    }
    if (declaringPackage != type.fPackage) return false;
  } while ((type = type.superclass()) != null);
  return false;
}
/* Answer true if the receiver is visible to the type provided by the scope.
* InvocationSite implements isSuperAccess() to provide additional information
* if the receiver is protected.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.