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

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding


        ImportReference importReference = (ImportReference) node;
        Binding binding = this.scope.getTypeOrPackage(CharOperation.subarray(importReference.tokens, 0, importReference.tokens.length));
        if ((binding != null) && (binding.isValidBinding())) {
          if (binding instanceof ReferenceBinding) {
            // this only happens if a type name has the same name as its package
            ReferenceBinding referenceBinding = (ReferenceBinding) binding;
            binding = referenceBinding.fPackage;
          }
          if (binding instanceof org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding) {
            IPackageBinding packageBinding = this.getPackageBinding((org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding) binding);
            if (packageBinding == null) {
View Full Code Here


  public TypeBinding resolveType(BlockScope scope) {

    constant = Constant.NotAConstant;
    if (!checkAccess(scope.methodScope()))
      return null;
    ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
    if (enclosingReceiverType.id == T_JavaLangObject) {
      scope.problemReporter().cannotUseSuperInJavaLangObject(this);
      return null;
    }
    return this.resolvedType = enclosingReceiverType.superclass();
  }
View Full Code Here

                resolvedPosition++;
            }

            // take into account the synthetic parameters
            if (methodBinding.declaringClass.isNestedType()) {
                ReferenceBinding enclosingInstanceTypes[];
                if ((enclosingInstanceTypes = methodBinding.declaringClass.syntheticEnclosingInstanceTypes()) != null) {
                    for (int i = 0, max = enclosingInstanceTypes.length; i < max; i++) {
                         // an enclosingInstanceType can only be a reference binding. It cannot be
                        // LongBinding or DoubleBinding
                        frame.putLocal(resolvedPosition, new VerificationTypeInfo(enclosingInstanceTypes[i]));
View Full Code Here

public void invokespecial(MethodBinding methodBinding) {
    super.invokespecial(methodBinding);
    // initialize to 0 since we will manually remove 'this'
    int argCount = 0;
    if (methodBinding.isConstructor()) {
        final ReferenceBinding declaringClass = methodBinding.declaringClass;
        if (declaringClass.isNestedType()) {
            // enclosing instances
            TypeBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes();
            if (syntheticArgumentTypes != null) {
                argCount += syntheticArgumentTypes.length;
            }
            // outer local variables
            SyntheticArgumentBinding[] syntheticArguments = declaringClass.syntheticOuterLocalVariables();
            if (syntheticArguments != null) {
                argCount += syntheticArguments.length;
            }
        }
        if (declaringClass.isEnum()) {
            argCount += 2;
        }
        argCount += methodBinding.parameters.length;
        if (this.currentFrame.numberOfStackItems >= (argCount + 1)) {
          this.currentFrame.numberOfStackItems -= argCount;
View Full Code Here

      // answer true if the receiverType is the declaringClass
      // AND the invocationType and the declaringClass have a common enclosingType
      // if (receiverType != declaringClass) return false;

      if (invocationType != declaringClass) {
        ReferenceBinding outerInvocationType = invocationType;
        ReferenceBinding temp = outerInvocationType.enclosingType();
        while (temp != null) {
          outerInvocationType = temp;
          temp = temp.enclosingType();
        }

        ReferenceBinding outerDeclaringClass = declaringClass;
        temp = outerDeclaringClass.enclosingType();
        while (temp != null) {
          outerDeclaringClass = temp;
          temp = temp.enclosingType();
        }
View Full Code Here

  }

  // Don't warn if there is an ITD method/ctor from a privileged aspect
  public void unusedPrivateField(FieldDeclaration fieldDecl) {
    if (fieldDecl.binding != null && fieldDecl.binding.declaringClass != null) {
      ReferenceBinding type = fieldDecl.binding.declaringClass;

      ResolvedType weaverType = null;
      if (!type.isAnonymousType()) {
        weaverType = factory.fromEclipse(type);
      } else {
        weaverType = factory.fromEclipse(type.superclass());
      }
      Set checked = new HashSet();
      for (Iterator i = weaverType.getInterTypeMungersIncludingSupers().iterator(); i.hasNext();) {
        ConcreteTypeMunger m = (ConcreteTypeMunger) i.next();
        ResolvedType theAspect = m.getAspectType();
View Full Code Here

      boolean isExactTargetType) {

    SourceTypeBinding aspectTypeBinding = (SourceTypeBinding) world.makeTypeBinding(aspectType);

    char[] mungerMemberTypeName = ("$" + munger.getMemberTypeName()).toCharArray();
    ReferenceBinding innerTypeBinding = null;
    for (ReferenceBinding innerType : aspectTypeBinding.memberTypes) {
      char[] compounded = CharOperation.concatWith(innerType.compoundName, '.');
      if (org.aspectj.org.eclipse.jdt.core.compiler.CharOperation.endsWith(compounded, mungerMemberTypeName)) {
        innerTypeBinding = innerType;
        break;
View Full Code Here

        return false;
      case Binding.GENERIC_TYPE :
        if (!typeBinding2.isGenericType()) {
          return false;
        }
        ReferenceBinding referenceBinding = (ReferenceBinding) typeBinding;
        ReferenceBinding referenceBinding2 = (ReferenceBinding) typeBinding2;
        return CharOperation.equals(referenceBinding.compoundName, referenceBinding2.compoundName)
          && (referenceBinding.modifiers & (ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccInterface | ClassFileConstants.AccEnum | ClassFileConstants.AccAnnotation))
              == (referenceBinding2.modifiers & (ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccInterface | ClassFileConstants.AccEnum | ClassFileConstants.AccAnnotation))
          && isEqual(referenceBinding.typeVariables(), referenceBinding2.typeVariables(), visitedTypes)
          && isEqual(referenceBinding.enclosingType(), referenceBinding2.enclosingType(), visitedTypes);

      case Binding.RAW_TYPE :
      default :
        if (!(typeBinding2 instanceof ReferenceBinding)) {
          return false;
        }       
        referenceBinding = (ReferenceBinding) typeBinding;
        referenceBinding2 = (ReferenceBinding) typeBinding2;
        char[] constantPoolName = referenceBinding.constantPoolName();
        char[] constantPoolName2 = referenceBinding2.constantPoolName();
        // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=116833
        if (constantPoolName == null) {
          if (constantPoolName2 != null) {
            return false;
          }
          if (!CharOperation.equals(referenceBinding.computeUniqueKey(), referenceBinding2.computeUniqueKey())) {
            return false;
          }
        } else {
          if (constantPoolName2 == null) {
            return false;
          }
          if (!CharOperation.equals(constantPoolName, constantPoolName2)) {
            return false;
          }
        }
        return CharOperation.equals(referenceBinding.compoundName, referenceBinding2.compoundName)
          && (!referenceBinding2.isGenericType())
          && (referenceBinding.isRawType() == referenceBinding2.isRawType())
          && ((referenceBinding.modifiers & ~ClassFileConstants.AccSuper) & (ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccInterface | ClassFileConstants.AccEnum | ClassFileConstants.AccAnnotation))
              == ((referenceBinding2.modifiers & ~ClassFileConstants.AccSuper) & (ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccInterface | ClassFileConstants.AccEnum | ClassFileConstants.AccAnnotation))
          && isEqual(referenceBinding.enclosingType(), referenceBinding2.enclosingType(), visitedTypes);
    }
  }
View Full Code Here

  /*
   * @see ITypeBinding#isMember()
   */
  public boolean isMember() {
    if (isClass() || isInterface() || isEnum()) {
      ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
      return referenceBinding.isMemberType();
    }
    return false;
  }
View Full Code Here

  /*
   * @see ITypeBinding#isNested()
   */
  public boolean isNested() {
    if (isClass() || isInterface() || isEnum()) {
      ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
      return referenceBinding.isNestedType();
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding

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.