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

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


          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

  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

  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

  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

    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

  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().unannotated())// should not emit yet another inner class for Outer.@Inner Inner.
    ReferenceBinding enclosingType = innerClass.enclosingType();
    while (enclosingType != null
        && enclosingType.isNestedType()) {
      this.innerClassesBindings.add(enclosingType.erasure().unannotated());
      enclosingType = enclosingType.enclosingType();
View Full Code Here

    ReferenceBinding innerClass = (ReferenceBinding) binding;
    this.innerClassesBindings.add(innerClass.erasure().unannotated())// should not emit yet another inner class for Outer.@Inner Inner.
    ReferenceBinding enclosingType = innerClass.enclosingType();
    while (enclosingType != null
        && enclosingType.isNestedType()) {
      this.innerClassesBindings.add(enclosingType.erasure().unannotated());
      enclosingType = enclosingType.enclosingType();
    }
  }

  public int recordBootstrapMethod(FunctionalExpression expression) {
View Full Code Here

      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

          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

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.