Package org.eclipse.jdt.internal.compiler.lookup

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


      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

      }
      return 0;
    }
 
    if (type.isTypeVariable()) { // incl. captures
      TypeVariableBinding typeVariable = (TypeVariableBinding)type;
      boolean haveNullBits = false;
      if (typeVariable.isCapture()) {
        TypeBinding lowerBound = ((CaptureBinding) typeVariable).lowerBound;
        if (lowerBound != null) {
          tagBits = lowerBound.tagBits & TagBits.AnnotationNullMASK;
          if (tagBits == TagBits.AnnotationNullable)
            return TagBits.AnnotationNullable; // cannot be @NonNull
View Full Code Here

       typeVariableBindings = this.typeBinding.typeVariables();
     } else {
       return;
     }
     for (int i = 0, length = typeVariableBindings.length; i < length; i++) {
      TypeVariableBinding typeVariableBinding = typeVariableBindings[i];
      if (CharOperation.equals(typeVariableName, typeVariableBinding.sourceName())) {
        this.typeBinding = typeVariableBinding;
        return;
      }
    }
  }
View Full Code Here

      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[] {
                new String(shownMethod.selector),
                typesAsString(shownMethod, false),
                new String(shownMethod.declaringClass.readableName()),
                typesAsString(invocationArguments, false),
                new String(inferredTypeArgument.readableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, false) },
        new String[] {
                new String(shownMethod.selector),
                typesAsString(shownMethod, true),
                new String(shownMethod.declaringClass.shortReadableName()),
                typesAsString(invocationArguments, true),
                new String(inferredTypeArgument.shortReadableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, true) },
        (int) (messageSend.nameSourcePosition >>> 32),
        (int) messageSend.nameSourcePosition);
      return;
    case ProblemReasons.TypeParameterArityMismatch :
View Full Code Here

      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,
        new String[] {
                new String(shownConstructor.declaringClass.sourceName()),
                typesAsString(shownConstructor, false),
                new String(shownConstructor.declaringClass.readableName()),
                typesAsString(invocationArguments, false),
                new String(inferredTypeArgument.readableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, false) },
        new String[] {
                new String(shownConstructor.declaringClass.sourceName()),
                typesAsString(shownConstructor, true),
                new String(shownConstructor.declaringClass.shortReadableName()),
                typesAsString(invocationArguments, true),
                new String(inferredTypeArgument.shortReadableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, true) },
        severity,
        sourceStart,
        sourceEnd);
      return;
View Full Code Here

      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[] {
                new String(shownMethod.selector),
                typesAsString(shownMethod, false),
                new String(shownMethod.declaringClass.readableName()),
                typesAsString(invocationArguments, false),
                new String(inferredTypeArgument.readableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, false) },
        new String[] {
                new String(shownMethod.selector),
                typesAsString(shownMethod, true),
                new String(shownMethod.declaringClass.shortReadableName()),
                typesAsString(invocationArguments, true),
                new String(inferredTypeArgument.shortReadableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, true) },
        severity,
        (int) (messageSend.nameSourcePosition >>> 32),
        (int) messageSend.nameSourcePosition);
      return;
View Full Code Here

      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[] {
                new String(shownConstructor.declaringClass.sourceName()),
                typesAsString(shownConstructor, false),
                new String(shownConstructor.declaringClass.readableName()),
                typesAsString(invocationArguments, false),
                new String(inferredTypeArgument.readableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, false) },
        new String[] {
                new String(shownConstructor.declaringClass.sourceName()),
                typesAsString(shownConstructor, true),
                new String(shownConstructor.declaringClass.shortReadableName()),
                typesAsString(invocationArguments, true),
                new String(inferredTypeArgument.shortReadableName()),
                new String(typeParameter.sourceName()),
                parameterBoundAsString(typeParameter, true) },
        sourceStart,
        sourceEnd);
      return;
View Full Code Here

   */
  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

           */
          org.eclipse.jdt.internal.core.util.Util.log(e, "Could not retrieve declaring method"); //$NON-NLS-1$
        }
      }
    } else if (this.binding.isTypeVariable()) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      Binding declaringElement = typeVariableBinding.declaringElement;
      if (declaringElement instanceof MethodBinding) {
        try {
          return this.resolver.getMethodBinding((MethodBinding)declaringElement);
        } catch (RuntimeException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding

Copyright © 2018 www.massapicom. 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.