Package org.eclipse.jdt.internal.compiler.util

Examples of org.eclipse.jdt.internal.compiler.util.SimpleSet.includes()


                if (typeVariable.rank >= varSuperType.rank && varSuperType.declaringElement == typeVariable.declaringElement) {
                  SimpleSet set = new SimpleSet(typeParameters.length);
                  set.add(typeVariable);
                  ReferenceBinding superBinding = varSuperType;
                  while (superBinding instanceof TypeVariableBinding) {
                    if (set.includes(superBinding)) {
                      problemReporter().hierarchyCircularity(typeVariable, varSuperType, typeRef);
                      typeVariable.tagBits |= TagBits.HierarchyHasProblems;
                      break firstBound; // do not keep first bound
                    } else {
                      set.add(superBinding);
View Full Code Here


    for (int j = 0; j < l; j++) {
      ReferenceBinding implementedInterface = superInterfaces[j];
      if (i != j && toCheck.implementsInterface(implementedInterface, true)) {
        if (redundantInterfaces == null) {
          redundantInterfaces = new SimpleSet(3);
        } else if (redundantInterfaces.includes(implementedInterface)) {
          continue;
        }
        redundantInterfaces.add(implementedInterface);
        TypeReference[] refs = this.type.scope.referenceContext.superInterfaces;
        for (int r = 0, rl = refs.length; r < rl; r++) {
View Full Code Here

  ReferenceBinding superType = superclass;
  while (superType != null && superType.isValidBinding()) {
    if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
      for (int i = 0, l = itsInterfaces.length; i < l; i++) {
        ReferenceBinding inheritedInterface = itsInterfaces[i];
        if (!inheritedInterfaces.includes(inheritedInterface) && inheritedInterface.isValidBinding()) {
          if (interfacesToCheck.includes(inheritedInterface)) {
            if (redundantInterfaces == null) {
              redundantInterfaces = new SimpleSet(3);
            } else if (redundantInterfaces.includes(inheritedInterface)) {
              continue;
View Full Code Here

      int itsLength = itsInterfaces.length;
      if (nextPosition + itsLength >= interfacesToVisit.length)
        System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
      for (int a = 0; a < itsLength; a++) {
        ReferenceBinding inheritedInterface = itsInterfaces[a];
        if (!inheritedInterfaces.includes(inheritedInterface) && inheritedInterface.isValidBinding()) {
          if (interfacesToCheck.includes(inheritedInterface)) {
            if (redundantInterfaces == null) {
              redundantInterfaces = new SimpleSet(3);
            } else if (redundantInterfaces.includes(inheritedInterface)) {
              continue;
View Full Code Here

  SimpleSet skip = findSuperinterfaceCollisions(superclass, superInterfaces);
  int len = superInterfaces.length;
  for (int i = len-1; i >= 0; i--) {
    superType = superInterfaces[i];
    if (superType.isValidBinding()) {
      if (skip != null && skip.includes(superType)) continue;

      MethodBinding[] methods = superType.unResolvedMethods();
      nextMethod : for (int m = methods.length; --m >= 0;) { // Interface methods are all abstract public
        MethodBinding inheritedMethod = methods[m];
        MethodBinding[] existingMethods = (MethodBinding[]) this.inheritedMethods.get(inheritedMethod.selector);
View Full Code Here

    for (int j = 0; j < l; j++) {
      ReferenceBinding implementedInterface = superInterfaces[j];
      if (i != j && toCheck.implementsInterface(implementedInterface, true)) {
        if (redundantInterfaces == null) {
          redundantInterfaces = new SimpleSet(3);
        } else if (redundantInterfaces.includes(implementedInterface)) {
          continue;
        }
        redundantInterfaces.add(implementedInterface);
        TypeReference[] refs = this.type.scope.referenceContext.superInterfaces;
        for (int r = 0, rl = refs.length; r < rl; r++) {
View Full Code Here

  ReferenceBinding superType = superclass;
  while (superType != null && superType.isValidBinding()) {
    if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
      for (int i = 0, l = itsInterfaces.length; i < l; i++) {
        ReferenceBinding inheritedInterface = itsInterfaces[i];
        if (!inheritedInterfaces.includes(inheritedInterface) && inheritedInterface.isValidBinding()) {
          if (interfacesToCheck.includes(inheritedInterface)) {
            if (redundantInterfaces == null) {
              redundantInterfaces = new SimpleSet(3);
            } else if (redundantInterfaces.includes(inheritedInterface)) {
              continue;
View Full Code Here

      int itsLength = itsInterfaces.length;
      if (nextPosition + itsLength >= interfacesToVisit.length)
        System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
      for (int a = 0; a < itsLength; a++) {
        ReferenceBinding inheritedInterface = itsInterfaces[a];
        if (!inheritedInterfaces.includes(inheritedInterface) && inheritedInterface.isValidBinding()) {
          if (interfacesToCheck.includes(inheritedInterface)) {
            if (redundantInterfaces == null) {
              redundantInterfaces = new SimpleSet(3);
            } else if (redundantInterfaces.includes(inheritedInterface)) {
              continue;
View Full Code Here

  SimpleSet skip = findSuperinterfaceCollisions(superclass, superInterfaces);
  for (int i = 0; i < nextPosition; i++) {
    superType = interfacesToVisit[i];
    if (superType.isValidBinding()) {
      if (skip != null && skip.includes(superType)) continue;
      if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
        int itsLength = itsInterfaces.length;
        if (nextPosition + itsLength >= interfacesToVisit.length)
          System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
        nextInterface : for (int a = 0; a < itsLength; a++) {
View Full Code Here

                if (typeVariable.rank >= varSuperType.rank && varSuperType.declaringElement == typeVariable.declaringElement) {
                  SimpleSet set = new SimpleSet(typeParameters.length);
                  set.add(typeVariable);
                  ReferenceBinding superBinding = varSuperType;
                  while (superBinding instanceof TypeVariableBinding) {
                    if (set.includes(superBinding)) {
                      problemReporter().hierarchyCircularity(typeVariable, varSuperType, typeRef);
                      typeVariable.tagBits |= TagBits.HierarchyHasProblems;
                      break firstBound; // do not keep first bound
                    } else {
                      set.add(superBinding);
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.