Examples of TypeVariableBinding


Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

  if (typeBinding.isNestedType()) {
    classFile.recordInnerClasses(typeBinding);
  }
  TypeVariableBinding[] typeVariables = typeBinding.typeVariables();
  for (int i = 0, max = typeVariables.length; i < max; i++) {
    TypeVariableBinding typeVariableBinding = typeVariables[i];
    if ((typeVariableBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
      Util.recordNestedType(classFile, typeVariableBinding);
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

          }
        }
      }
    } else if (typeBinding.isTypeVariable()
        && ((typeBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) typeBinding;
      TypeBinding upperBound = typeVariableBinding.upperBound();
      if (upperBound != null && ((upperBound.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
        recordNestedType(classFile, upperBound);
      }
      TypeBinding[] upperBounds = typeVariableBinding.otherUpperBounds();
      if (upperBounds != null) {
        for (int k = 0, max3 =  upperBounds.length; k < max3; k++) {
          TypeBinding otherUpperBound = upperBounds[k];
          if ((otherUpperBound.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
            recordNestedType(classFile, otherUpperBound);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

    if (typeBinding.isNestedType()) {
      classFile.recordInnerClasses(typeBinding);
    }
    TypeVariableBinding[] typeVariables = typeBinding.typeVariables();
    for (int i = 0, max = typeVariables.length; i < max; i++) {
      TypeVariableBinding typeVariableBinding = typeVariables[i];
      if ((typeVariableBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
        Util.recordNestedType(classFile, typeVariableBinding);
      }
    }
    // add its fields
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

    int otherLength = otherBindings.length;
    if (length != otherLength) {
      return false;
    }
    for (int i = 0; i < length; i++) {
      TypeVariableBinding typeVariableBinding = bindings[i];
      TypeVariableBinding typeVariableBinding2 = otherBindings[i];
      if (!isEqual(typeVariableBinding, typeVariableBinding2)) {
        return false;
      }
    }
    return true;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

            return isEqual(captureBinding.wildcard, captureBinding2.wildcard, visitedTypes)
              && isEqual(captureBinding.sourceType, captureBinding2.sourceType, visitedTypes);
          }
          return false;
        }
        TypeVariableBinding typeVariableBinding = (TypeVariableBinding) typeBinding;
        TypeVariableBinding typeVariableBinding2 = (TypeVariableBinding) typeBinding2;
        if (CharOperation.equals(typeVariableBinding.sourceName, typeVariableBinding2.sourceName)) {
          if (visitedTypes.contains(typeBinding)) return true;
          visitedTypes.add(typeBinding);

          return isEqual(typeVariableBinding.declaringElement, typeVariableBinding2.declaringElement, visitedTypes)
          && isEqual(typeVariableBinding.superclass(), typeVariableBinding2.superclass(), visitedTypes)
          && isEqual(typeVariableBinding.superInterfaces(), typeVariableBinding2.superInterfaces(), visitedTypes);
        }
        return false;
      case Binding.GENERIC_TYPE :
        if (!typeBinding2.isGenericType()) {
          return false;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

    if (typeBinding.isNestedType()) {
      classFile.recordInnerClasses(typeBinding);
    }
    TypeVariableBinding[] typeVariables = typeBinding.typeVariables();
    for (int i = 0, max = typeVariables.length; i < max; i++) {
      TypeVariableBinding typeVariableBinding = typeVariables[i];
      if ((typeVariableBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
        Util.recordNestedType(classFile, typeVariableBinding);
      }
    }
    // add its fields
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

  /* (non-Javadoc)
   * @see javax.lang.model.type.TypeVariable#getUpperBound()
   */
  @Override
  public TypeMirror getUpperBound() {
    TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this._binding;
    TypeBinding firstBound = typeVariableBinding.firstBound;
    ReferenceBinding[] superInterfaces = typeVariableBinding.superInterfaces;
    if (firstBound == null || superInterfaces.length == 0) {
      // no explicit bound
      return _env.getFactory().newTypeMirror(typeVariableBinding.upperBound());
    }
    if (firstBound != null && superInterfaces.length == 1 && superInterfaces[0] == firstBound) {
      // only one bound that is an interface
      return _env.getFactory().newTypeMirror(typeVariableBinding.upperBound());
    }
    return this._env.getFactory().newDeclaredType((TypeVariableBinding) this._binding);
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

  }
 
  @Override
  public TypeKind getKind()
  {
    TypeVariableBinding variableBinding = (TypeVariableBinding) _binding;
    if ((!variableBinding.isValidBinding() || ((variableBinding.tagBits & TagBits.HasMissingType) != 0))) {
      return TypeKind.ERROR;
    }
    return TypeKind.TYPEVAR;
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

          }
        }
      }
    } else if (typeBinding.isTypeVariable()
        && ((typeBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) typeBinding;
      TypeBinding upperBound = typeVariableBinding.upperBound();
      if (upperBound != null && ((upperBound.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
        recordNestedType(classFile, upperBound);
      }
      TypeBinding[] upperBounds = typeVariableBinding.otherUpperBounds();
      if (upperBounds != null) {
        for (int k = 0, max3 =  upperBounds.length; k < max3; k++) {
          TypeBinding otherUpperBound = upperBounds[k];
          if ((otherUpperBound.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
            recordNestedType(classFile, otherUpperBound);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

      problemConstructor = (ProblemMethodBinding) targetConstructor;
      ParameterizedGenericMethodBinding substitutedConstructor = (ParameterizedGenericMethodBinding) problemConstructor.closestMatch;
      shownConstructor = substitutedConstructor.original();
      int augmentedLength = problemConstructor.parameters.length;
      TypeBinding inferredTypeArgument = problemConstructor.parameters[augmentedLength-2];
      TypeVariableBinding typeParameter = (TypeVariableBinding) problemConstructor.parameters[augmentedLength-1];
      TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end
      System.arraycopy(problemConstructor.parameters, 0, invocationArguments, 0, augmentedLength-2);
      this.handle(
        IProblem.GenericConstructorTypeArgumentMismatch,
        new String[] {
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.