Examples of TypeVariableBinding


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

      problemMethod = (ProblemMethodBinding) method;
      ParameterizedGenericMethodBinding substitutedMethod = (ParameterizedGenericMethodBinding) problemMethod.closestMatch;
      shownMethod = substitutedMethod.original();
      int augmentedLength = problemMethod.parameters.length;
      TypeBinding inferredTypeArgument = problemMethod.parameters[augmentedLength-2];
      TypeVariableBinding typeParameter = (TypeVariableBinding) problemMethod.parameters[augmentedLength-1];
      TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end
      System.arraycopy(problemMethod.parameters, 0, invocationArguments, 0, augmentedLength-2);
      this.handle(
        IProblem.GenericMethodTypeArgumentMismatch,
        new String[] {
View Full Code Here

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

      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.JavadocGenericConstructorTypeArgumentMismatch,
View Full Code Here

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

      problemMethod = (ProblemMethodBinding) method;
      ParameterizedGenericMethodBinding substitutedMethod = (ParameterizedGenericMethodBinding) problemMethod.closestMatch;
      shownMethod = substitutedMethod.original();
      int augmentedLength = problemMethod.parameters.length;
      TypeBinding inferredTypeArgument = problemMethod.parameters[augmentedLength-2];
      TypeVariableBinding typeParameter = (TypeVariableBinding) problemMethod.parameters[augmentedLength-1];
      TypeBinding[] invocationArguments = new TypeBinding[augmentedLength-2]; // remove extra info from the end
      System.arraycopy(problemMethod.parameters, 0, invocationArguments, 0, augmentedLength-2);
      this.handle(
        IProblem.JavadocGenericMethodTypeArgumentMismatch,
        new String[] {
View Full Code Here

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

    return _bounds;
  }
 
  // This code is drawn from org.eclipse.jdt.core.dom.TypeBinding.getTypeBounds()
  private List<? extends TypeMirror> calculateBounds() {
    TypeVariableBinding typeVariableBinding = (TypeVariableBinding)_binding;
    ReferenceBinding varSuperclass = typeVariableBinding.superclass();
    TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
    int boundsLength = 0;
    if (firstClassOrArrayBound != null) {
      if (firstClassOrArrayBound == varSuperclass) {
        boundsLength++;
      } else if (firstClassOrArrayBound.isArrayType()) { // capture of ? extends/super arrayType
        boundsLength++;
      } else {
        firstClassOrArrayBound = null;
      }
    }
    ReferenceBinding[] superinterfaces = typeVariableBinding.superInterfaces();
    int superinterfacesLength = 0;
    if (superinterfaces != null) {
      superinterfacesLength = superinterfaces.length;
      boundsLength += superinterfacesLength;
    }
View Full Code Here

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

    // if method from parameterized type got found, use the original method at codegen time
    MethodBinding codegenBinding = this.binding.original();
    if (codegenBinding != this.binding) {
        // extra cast needed if method return type was type variable
        if (codegenBinding.returnType.isTypeVariable()) {
            TypeVariableBinding variableReturnType = (TypeVariableBinding) codegenBinding.returnType;
            if (variableReturnType.firstBound != this.binding.returnType) { // no need for extra cast if same as first bound anyway
            this.valueCast = this.binding.returnType;
            }
        }
    }
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);
    }
  }
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

   */
  public String getBinaryName() {
    if (this.binding.isCapture()) {
      return null; // no binary name for capture binding
    } else if (this.binding.isTypeVariable()) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      org.eclipse.jdt.internal.compiler.lookup.Binding declaring = typeVariableBinding.declaringElement;
      StringBuffer binaryName = new StringBuffer();
      switch(declaring.kind()) {
        case org.eclipse.jdt.internal.compiler.lookup.Binding.METHOD :
          MethodBinding methodBinding = (MethodBinding) declaring;
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.