Examples of ReferenceBinding


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

          needSerialVersion = !hasWriteObjectMethod || !hasReadObjectMethod;
        }
    }
    // generics (and non static generic members) cannot extend Throwable
    if (sourceType.findSuperTypeErasingTo(TypeIds.T_JavaLangThrowable, true) != null) {
      ReferenceBinding current = sourceType;
      checkEnclosedInGeneric : do {
        if (current.isGenericType()) {
          this.scope.problemReporter().genericTypeCannotExtendThrowable(this);
          break checkEnclosedInGeneric;           
        }
        if (current.isStatic()) break checkEnclosedInGeneric;
        if (current.isLocalType()) {
          NestedTypeBinding nestedType = (NestedTypeBinding) current.erasure();
          if (nestedType.scope.methodScope().isStatic) break checkEnclosedInGeneric;
        }       
      } while ((current = current.enclosingType()) != null);
    }
    this.maxFieldCount = 0;
    int lastVisibleFieldID = -1;
    boolean hasEnumConstants = false;
    boolean hasEnumConstantsWithoutBody = false;
View Full Code Here

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

    // check collision scenarii
    Binding existing = blockScope.getType(this.name);
    if (existing instanceof ReferenceBinding
        && existing != this.binding
        && existing.isValidBinding()) {
      ReferenceBinding existingType = (ReferenceBinding) existing;
      if (existingType instanceof TypeVariableBinding) {
        blockScope.problemReporter().typeHiding(this, (TypeVariableBinding) existingType);
      } else if (existingType instanceof LocalTypeBinding
            && ((LocalTypeBinding) existingType).scope.methodScope() == blockScope.methodScope()) {
          // dup in same method
View Full Code Here

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

    return pairs;
  }

  public IMemberValuePairBinding[] getAllMemberValuePairs() {
    IMemberValuePairBinding[] pairs = getDeclaredMemberValuePairs();
    ReferenceBinding typeBinding = this.internalAnnotation.getAnnotationType();
    if (typeBinding == null) return pairs;
    MethodBinding[] methods = typeBinding.availableMethods(); // resilience
    int methodLength = methods == null ? 0 : methods.length;
    if (methodLength == 0) return pairs;

    int declaredLength = pairs.length;
    if (declaredLength == methodLength)
View Full Code Here

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

      return annotationType.getName();
    }
  }
 
  public boolean isDeprecated() {
    ReferenceBinding typeBinding = this.internalAnnotation.getAnnotationType();
    if (typeBinding == null) return false;
    return typeBinding.isDeprecated();
  }
View Full Code Here

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

      Binding binding = scope.getTypeOrPackage(tokens);
      if (binding instanceof PackageBinding) {
        this.packageBinding = (PackageBinding) binding;
      } else {
        if (this.resolvedType.problemId() == ProblemReasons.NonStaticReferenceInStaticContext) {
          ReferenceBinding closestMatch = ((ProblemReferenceBinding)this.resolvedType).closestMatch();
          if (closestMatch != null && closestMatch.isTypeVariable()) {
            this.resolvedType = closestMatch; // ignore problem as we want report specific javadoc one instead
            return this.resolvedType;
          }
        }
        reportInvalidType(scope);
View Full Code Here

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

      contents[contentsOffset++] = (byte) (value >> 8);
      contents[contentsOffset++] = (byte) value;
      contents[contentsOffset++] = (byte) (numberOfInnerClasses >> 8);
      contents[contentsOffset++] = (byte) numberOfInnerClasses;
      for (int i = 0; i < numberOfInnerClasses; i++) {
        ReferenceBinding innerClass = innerClasses[i];
        int accessFlags = innerClass.getAccessFlags();
        int innerClassIndex = constantPool.literalIndexForType(innerClass.constantPoolName());
        // inner class index
        contents[contentsOffset++] = (byte) (innerClassIndex >> 8);
        contents[contentsOffset++] = (byte) innerClassIndex;
        // outer class index: anonymous and local have no outer class index
        if (innerClass.isMemberType()) {
          // member or member of local
          int outerClassIndex = constantPool.literalIndexForType(innerClass.enclosingType().constantPoolName());
          contents[contentsOffset++] = (byte) (outerClassIndex >> 8);
          contents[contentsOffset++] = (byte) outerClassIndex;
        } else {
          // equals to 0 if the innerClass is not a member type
          contents[contentsOffset++] = 0;
          contents[contentsOffset++] = 0;
        }
        // name index
        if (!innerClass.isAnonymousType()) {
          int nameIndex = constantPool.literalIndex(innerClass.sourceName());
          contents[contentsOffset++] = (byte) (nameIndex >> 8);
          contents[contentsOffset++] = (byte) nameIndex;
        } else {
          // equals to 0 if the innerClass is an anonymous type
          contents[contentsOffset++] = 0;
          contents[contentsOffset++] = 0;
        }
        // access flag
        if (innerClass.isAnonymousType()) {
          accessFlags &= ~ClassFileConstants.AccFinal;
        } else if (innerClass.isMemberType() && innerClass.isInterface()) {
          accessFlags |= ClassFileConstants.AccStatic; // implicitely static
        }
        contents[contentsOffset++] = (byte) (accessFlags >> 8);
        contents[contentsOffset++] = (byte) accessFlags;
      }
View Full Code Here

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

      char[] typeName = currentName.toCharArray();
      compoundName = CharOperation.splitOn('.', typeName);
    } else {
      compoundName = new char[][] { currentName.toCharArray() };
    }
    ReferenceBinding type = environment.getType(compoundName);
    if (type != null && type.isValidBinding()) {
      if (type.isBinaryBinding()) {
        referenceBindings[i] = type;
      }
    } else {
      throw new InvalidInputException(
          this.bind("configure.invalidClassName", currentName));//$NON-NLS-1$
View Full Code Here

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

      int genericLocalVariablesCounter = 0;
      LocalVariableBinding[] genericLocalVariables = null;
      int numberOfGenericEntries = 0;
     
      if (binding.isConstructor()) {
        ReferenceBinding declaringClass = binding.declaringClass;
        if (declaringClass.isNestedType()) {
          NestedTypeBinding methodDeclaringClass = (NestedTypeBinding) declaringClass;
          argSize = methodDeclaringClass.enclosingInstancesSlotSize;
          SyntheticArgumentBinding[] syntheticArguments;
          if ((syntheticArguments = methodDeclaringClass.syntheticEnclosingInstances()) != null) {
            for (int i = 0, max = syntheticArguments.length; i < max; i++) {
View Full Code Here

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

     // } else {
     //   superclassNameIndex =
     //   (aType.superclass == null ? 0 : constantPool.literalIndexForType(aType.superclass));
     // }
     // new code:
       ReferenceBinding superclass = null;
       int superclassNameIndex = -1;
       if (aType.originalSuperclass!=null) superclass=aType.originalSuperclass;
       else superclass=aType.superclass;
     if (aType.isInterface()) {
      superclassNameIndex = constantPool.literalIndexForType(ConstantPool.JavaLangObjectConstantPoolName);
     } else {
      superclassNameIndex =
        (superclass == null ? 0 : constantPool.literalIndexForType(superclass.constantPoolName()));
     }
         // End AspectJ extension
    contents[contentsOffset++] = (byte) (superclassNameIndex >> 8);
    contents[contentsOffset++] = (byte) superclassNameIndex;
   
View Full Code Here

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

  public void recordInnerClasses(TypeBinding binding) {
    if (this.innerClassesBindings == null) {
      this.innerClassesBindings = new HashSet(INNER_CLASSES_SIZE);
    }
    ReferenceBinding innerClass = (ReferenceBinding) binding;
    this.innerClassesBindings.add(innerClass.erasure());
    ReferenceBinding enclosingType = innerClass.enclosingType();
    while (enclosingType != null
        && enclosingType.isNestedType()) {
      this.innerClassesBindings.add(enclosingType.erasure());
      enclosingType = enclosingType.enclosingType();
    }
  }
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.