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

Examples of org.eclipse.jdt.internal.compiler.lookup.TypeBinding.erasure()


        guessedType = ref.resolveType((ClassScope)scope);
        break;
    }
    if (guessedType != null && guessedType.isValidBinding()) {
      // the erasure must be used because guessedType can be a RawTypeBinding
      guessedType = guessedType.erasure();
      TypeVariableBinding[] typeVars = guessedType.typeVariables();
      for (int i = 0; i < parameterTypes.length; i++) {
        for (int j = 0; j < typeVars.length; j++) {
          if (CharOperation.equals(parameterTypes[i].toCharArray(), typeVars[j].sourceName))
            return false;
View Full Code Here


    TypeBinding returnType;
    if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
      returnType = this.binding.returnType;
      if (returnType != null) {
        returnType = scope.environment().convertToRawType(returnType.erasure(), true);
      }
    } else {
      returnType = this.binding.returnType;
      if (returnType != null) {
        returnType = returnType.capture(scope, this.sourceEnd);
View Full Code Here

      this.value.computeConversion(scope, requiredType, valueType);
    }

    // annotation methods can only return base types, String, Class, enum type, annotation types and arrays of these
    checkAnnotationMethodType: {
      switch (leafType.erasure().id) {
        case T_byte :
        case T_short :
        case T_char :
        case T_int :
        case T_long :
View Full Code Here

  } else {
    TypeBinding returnType = this.binding.returnType;
   
    if (returnType != null) {
      if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
        returnType = scope.environment().convertToRawType(returnType.erasure(), true);
      }
      returnType = returnType.capture(scope, this.sourceEnd);     
    }
    this.resolvedType = returnType;
  }
View Full Code Here

  } else {
    TypeBinding returnType;
    if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
      returnType = this.binding.original().returnType;
      if (returnType != null) {
        returnType = scope.environment().convertToRawType(returnType.erasure(), true);
      }
    } else {
      returnType = this.binding.returnType;
      if (returnType != null) {
        returnType = returnType.capture(scope, this.sourceEnd);
View Full Code Here

      // annotation methods can only return base types, String, Class, enum type, annotation types and arrays of these
      checkAnnotationMethodType: {
        TypeBinding leafReturnType = returnTypeBinding.leafComponentType();
        if (returnTypeBinding.dimensions() <= 1) { // only 1-dimensional array permitted
          switch (leafReturnType.erasure().id) {
            case T_byte :
            case T_short :
            case T_char :
            case T_int :
            case T_long :
View Full Code Here

      this.value.computeConversion(scope, requiredType, valueType);
    }

    // annotation methods can only return base types, String, Class, enum type, annotation types and arrays of these
    checkAnnotationMethodType: {
      switch (leafType.erasure().id) {
        case T_byte :
        case T_short :
        case T_char :
        case T_int :
        case T_long :
View Full Code Here

  } else {
    TypeBinding returnType = this.binding.returnType;
   
    if (returnType != null) {
      if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
        returnType = scope.environment().convertToRawType(returnType.erasure(), true);
      }
      returnType = returnType.capture(scope, this.sourceEnd);     
    }
    this.resolvedType = returnType;
  }
View Full Code Here

        guessedType = ref.resolveType((ClassScope)scope);
        break;
    }
    if (guessedType != null && guessedType.isValidBinding()) {
      // the erasure must be used because guessedType can be a RawTypeBinding
      guessedType = guessedType.erasure();
      TypeVariableBinding[] typeVars = guessedType.typeVariables();
      for (int i = 0; i < parameterTypes.length; i++) {
        for (int j = 0; j < typeVars.length; j++) {
          if (CharOperation.equals(parameterTypes[i].toCharArray(), typeVars[j].sourceName))
            return false;
View Full Code Here

    TypeBinding returnType;
    if ((this.bits & ASTNode.Unchecked) != 0 && this.genericTypeArguments == null) {
      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643, align with javac on JLS 15.12.2.6
      returnType = this.binding.returnType;
      if (returnType != null) {
        returnType = scope.environment().convertToRawType(returnType.erasure(), true);
      }
    } else {
      returnType = this.binding.returnType;
      if (returnType != null) {
        returnType = returnType.capture(scope, this.sourceEnd);
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.