Examples of erasure()


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

    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;
      return get(pmb.original());
    } else if (binding instanceof ParameterizedFieldBinding) {
      ParameterizedFieldBinding pfb = (ParameterizedFieldBinding) binding;
View Full Code Here

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

      MethodBinding codegenBinding = this.binding.original();
      ReferenceBinding targetType = codegenBinding.declaringClass;

      // special name&ordinal argument generation for enum constructors
      if (targetType.erasure().id == TypeIds.T_JavaLangEnum || targetType.isEnum()) {
        codeStream.aload_1(); // pass along name param as name arg
        codeStream.iload_2(); // pass along ordinal param as ordinal arg
      }
      // handling innerclass constructor invocation
      // handling innerclass instance allocation - enclosing instance arguments
View Full Code Here

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

          rcvHasError = true;
        }
      }
      if (receiverType != null) {
        // prevent (explicit) super constructor invocation from within enum
        if (this.accessMode == ExplicitConstructorCall.Super && receiverType.erasure().id == TypeIds.T_JavaLangEnum) {
          scope.problemReporter().cannotInvokeSuperConstructorInEnum(this, methodScope.referenceMethod().binding);
        }
        // qualification should be from the type of the enclosingType
        if (this.qualification != null) {
          if (this.accessMode != ExplicitConstructorCall.Super) {
View Full Code Here

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

  ReferenceBinding type = (ReferenceBinding) receiverType;
  PackageBinding declaringPackage = fieldBinding.declaringClass.fPackage;
  TypeBinding originalDeclaringClass = fieldBinding.declaringClass .original();
  do {
    if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
      if (originalDeclaringClass == type.erasure().original()) return true
    } else {
      if (originalDeclaringClass == type.original()) return true;
    }
    if (declaringPackage != type.fPackage) return false;
  } while ((type = type.superclass()) != null);
View Full Code Here

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

  ReferenceBinding type = (ReferenceBinding) receiverType;
  PackageBinding declaringPackage = methodBinding.declaringClass.fPackage;
  TypeBinding originalDeclaringClass = methodBinding.declaringClass .original();
  do {
    if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
      if (originalDeclaringClass == type.erasure().original()) return true;
    } else {
      if (originalDeclaringClass == type.original()) return true;
    }
    if (declaringPackage != type.fPackage) return false;
  } while ((type = type.superclass()) != null);
View Full Code Here

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

  public void recordInnerClasses(TypeBinding binding) {
    if (this.innerClassesBindings == null) {
      this.innerClassesBindings = new HashSet(INNER_CLASSES_SIZE);
    }
    ReferenceBinding innerClass = (ReferenceBinding) binding;
    this.innerClassesBindings.add(innerClass.erasure());
    ReferenceBinding enclosingType = innerClass.enclosingType();
    while (enclosingType != null
        && enclosingType.isNestedType()) {
      this.innerClassesBindings.add(enclosingType.erasure());
      enclosingType = enclosingType.enclosingType();
View Full Code Here

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

    ReferenceBinding innerClass = (ReferenceBinding) binding;
    this.innerClassesBindings.add(innerClass.erasure());
    ReferenceBinding enclosingType = innerClass.enclosingType();
    while (enclosingType != null
        && enclosingType.isNestedType()) {
      this.innerClassesBindings.add(enclosingType.erasure());
      enclosingType = enclosingType.enclosingType();
    }
  }

  public void reset(SourceTypeBinding typeBinding) {
View Full Code Here

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

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

    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

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

      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
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.