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

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


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


    ReferenceBinding binding = (ReferenceBinding) typeBinding;
    while (binding.superclass() != null) {
      if (JSO_CLASS.equals(String.valueOf(binding.superclass().constantPoolName()))) {
        return true;
      }
      binding = binding.superclass();
    }
    return false;
  }
}
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

    boolean needSynthetics = isConstructor && declaringClass.isNestedType();
    if (needSynthetics) {
      // Take into account the synthetic argument names
      // This tracks JLS8, paragraph 8.8.9
      boolean anonymousWithLocalSuper = declaringClass.isAnonymousType() && declaringClass.superclass().isLocalType();
      boolean anonymousWithNestedSuper = declaringClass.isAnonymousType() && declaringClass.superclass().isNestedType();
      boolean isImplicitlyDeclared = ((! declaringClass.isPrivate()) || declaringClass.isAnonymousType()) && !anonymousWithLocalSuper;
      ReferenceBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes();
      if (syntheticArgumentTypes != null) {
        for (int i = 0, count = syntheticArgumentTypes.length; i < count; i++) {
View Full Code Here

    boolean needSynthetics = isConstructor && declaringClass.isNestedType();
    if (needSynthetics) {
      // Take into account the synthetic argument names
      // This tracks JLS8, paragraph 8.8.9
      boolean anonymousWithLocalSuper = declaringClass.isAnonymousType() && declaringClass.superclass().isLocalType();
      boolean anonymousWithNestedSuper = declaringClass.isAnonymousType() && declaringClass.superclass().isNestedType();
      boolean isImplicitlyDeclared = ((! declaringClass.isPrivate()) || declaringClass.isAnonymousType()) && !anonymousWithLocalSuper;
      ReferenceBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes();
      if (syntheticArgumentTypes != null) {
        for (int i = 0, count = syntheticArgumentTypes.length; i < count; i++) {
          // This behaviour tracks JLS 15.9.5.1
View Full Code Here

        for (int i = 0, count = syntheticArgumentTypes.length; i < count; i++) {
          // This behaviour tracks JLS 15.9.5.1
          // This covers that the parameter ending up in a nested class must be mandated "on the way in", even if it
          // isn't the first. The practical relevance of this is questionable, since the constructor call will be
          // generated by the same constructor.
          boolean couldForwardToMandated = anonymousWithNestedSuper ? declaringClass.superclass().enclosingType().equals(syntheticArgumentTypes[i]) : true;
          int modifier = couldForwardToMandated && isImplicitlyDeclared ? ClassFileConstants.AccMandated : ClassFileConstants.AccSynthetic;
          char[] name = CharOperation.concat(
              TypeConstants.SYNTHETIC_ENCLOSING_INSTANCE_PREFIX,
              String.valueOf(i).toCharArray()); // cannot use depth, can be identical
          length = writeArgumentName(name, modifier | ClassFileConstants.AccFinal, length);
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

    ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
    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

      collectSuperInterfaces(binding, superinterfaces, newfound);
      for (ReferenceBinding superinterface : newfound) {
        addMembers(superinterface, false, types, fields, methods);
      }
      superinterfaces.addAll(newfound);
      binding = binding.superclass();
      ignoreVisibility = false;
    }
    List<Element> allMembers = new ArrayList<Element>();
    for (ReferenceBinding nestedType : types.values()) {
      allMembers.add(_env.getFactory().newElement(nestedType));
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.