Examples of TypeVariableBinding


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

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

    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

        // Fall-through to failure
      }
    }

    if (binding instanceof TypeVariableBinding) {
      TypeVariableBinding tvBinding = (TypeVariableBinding) binding;
      JTypeParameter typeParameter = tvMapper.get(tvBinding);
      if (typeParameter != null) {
        return typeParameter;
      }
View Full Code Here

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

    this.program = program;
  }

  public JNode get(Binding binding) {
    if (binding instanceof TypeVariableBinding) {
      TypeVariableBinding tvb = (TypeVariableBinding) binding;
      return get(tvb.erasure());
    } else if (binding instanceof ParameterizedTypeBinding) {
      ParameterizedTypeBinding ptb = (ParameterizedTypeBinding) binding;
      return get(ptb.erasure());
    } else if (binding instanceof ParameterizedMethodBinding) {
      ParameterizedMethodBinding pmb = (ParameterizedMethodBinding) binding;
View Full Code Here

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

        // Fall-through to failure
      }
    }

    if (binding instanceof TypeVariableBinding) {
      TypeVariableBinding tvBinding = (TypeVariableBinding) binding;
      JTypeParameter typeParameter = tvMapper.get(tvBinding);
      if (typeParameter != null) {
        return typeParameter;
      }
View Full Code Here

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

    return method.getType() == get(binding.returnType);
  }

  private JNode get(Binding binding, boolean failOnNull) {
    if (binding instanceof TypeVariableBinding) {
      TypeVariableBinding tvb = (TypeVariableBinding) binding;
      return get(tvb.erasure(), failOnNull);
    } else if (binding instanceof ParameterizedTypeBinding) {
      ParameterizedTypeBinding ptb = (ParameterizedTypeBinding) binding;
      return get(ptb.erasure(), failOnNull);
    } else if (binding instanceof ParameterizedMethodBinding) {
      ParameterizedMethodBinding pmb = (ParameterizedMethodBinding) binding;
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 (TypeBinding.notEquals(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
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.