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

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


      char[][] compoundName = CharOperation.splitOn('.',
          className.toCharArray());
      TypeBinding binding = cud.scope.getType(compoundName, compoundName.length);

      if (binding instanceof ProblemReferenceBinding) {
        ProblemReferenceBinding prb = (ProblemReferenceBinding) binding;
        if (prb.problemId() == ProblemReasons.NotVisible) {
          // It's just a visibility problem, so try drilling
          // down manually
          ReferenceBinding drilling = prb.closestMatch();
          for (int i = prb.compoundName.length; i < compoundName.length; i++) {
            drilling = drilling.getMemberType(compoundName[i]);
          }
          binding = drilling;
        }
View Full Code Here


      // compoundName[newLen], '$');
      // compoundName = next;
      // binding = cud.scope.environment().askForType(compoundName);
      // }
      if (binding instanceof ProblemReferenceBinding) {
        ProblemReferenceBinding prb = (ProblemReferenceBinding) binding;
        if (prb.problemId() == ProblemReasons.NotVisible) {
          // It's just a visibility problem, so try drilling down manually
          ReferenceBinding drilling = prb.closestReferenceMatch();
          for (int i = prb.compoundName.length; i < compoundName.length; i++) {
            drilling = drilling.getMemberType(compoundName[i]);
          }
          binding = drilling;
        }
View Full Code Here

      TypeBinding typeBinding = cud.scope.getType(compoundName,
          compoundName.length);
      if (typeBinding == null) {
        GWTProblem.recordError(rescue, cud, notFound(className), null);
      } else if (typeBinding instanceof ProblemReferenceBinding) {
        ProblemReferenceBinding problem = (ProblemReferenceBinding) typeBinding;
        if (problem.problemId() == ProblemReasons.NotVisible) {
          // Ignore
        } else if (problem.problemId() == ProblemReasons.NotFound) {
          GWTProblem.recordError(rescue, cud, notFound(className), null);
        } else {
          GWTProblem.recordError(rescue, cud,
              unknownProblem(className, problem), null);
        }
View Full Code Here

    } else if (!referenceBinding.isValidBinding()) {
      switch(referenceBinding.problemId()) {
        case ProblemReasons.NotVisible :
        case ProblemReasons.NonStaticReferenceInStaticContext :
          if (referenceBinding instanceof ProblemReferenceBinding) {
            ProblemReferenceBinding problemReferenceBinding = (ProblemReferenceBinding) referenceBinding;
            org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding2 = problemReferenceBinding.closestMatch();
            ITypeBinding binding = (ITypeBinding) this.bindingTables.compilerBindingsToASTBindings.get(binding2);
            if (binding != null) {
              return binding;
            }
            binding = new TypeBinding(this, binding2);
View Full Code Here

          this.genericCast = originalBinding.type.genericCast(targetType);
          if (this.genericCast instanceof ReferenceBinding) {
        ReferenceBinding referenceCast = (ReferenceBinding) this.genericCast;
        if (!referenceCast.canBeSeenBy(scope)) {
              scope.problemReporter().invalidType(this,
                  new ProblemReferenceBinding(
                CharOperation.splitOn('.', referenceCast.shortReadableName()),
                referenceCast,
                ProblemReasons.NotVisible));
        }
          }
View Full Code Here

      scope.problemReporter().typeMismatchError(enclosingInstanceType, expectedType, this.enclosingInstance, null);
      return this.resolvedType = receiverType;
    }
    ReferenceBinding superType = (ReferenceBinding) receiverType;
    if (superType.isTypeVariable()) {
      superType = new ProblemReferenceBinding(new char[][]{superType.sourceName()}, superType, ProblemReasons.IllegalSuperTypeVariable);
      scope.problemReporter().invalidType(this, superType);
      return null;
    } else if (this.type != null && superType.isEnum()) { // tolerate enum constant body
      scope.problemReporter().cannotInstantiate(this.type, superType);
      return this.resolvedType = superType;
View Full Code Here

  TypeBinding superType = resolveType(scope);
  if (superType == null) return null;

  if (superType.isTypeVariable()) {
    if (this.resolvedType.isValidBinding()) {
      this.resolvedType = new ProblemReferenceBinding(getTypeName(), (ReferenceBinding)this.resolvedType, ProblemReasons.IllegalSuperTypeVariable);
      reportInvalidType(scope);
    }
    return null;
  }
  return superType;
View Full Code Here

          this.genericCast = originalType.genericCast(scope.boxing(targetType));
          if (this.genericCast instanceof ReferenceBinding) {
        ReferenceBinding referenceCast = (ReferenceBinding) this.genericCast;
        if (!referenceCast.canBeSeenBy(scope)) {
              scope.problemReporter().invalidType(this,
                  new ProblemReferenceBinding(
                CharOperation.splitOn('.', referenceCast.shortReadableName()),
                referenceCast,
                ProblemReasons.NotVisible));
        }
          }
View Full Code Here

    }
        if (this.valueCast instanceof ReferenceBinding) {
      ReferenceBinding referenceCast = (ReferenceBinding) this.valueCast;
      if (!referenceCast.canBeSeenBy(scope)) {
            scope.problemReporter().invalidType(this,
                new ProblemReferenceBinding(
              CharOperation.splitOn('.', referenceCast.shortReadableName()),
              referenceCast,
              ProblemReasons.NotVisible));
      }
        }
View Full Code Here

      setGenericCast(length, typeCast);
      if (typeCast instanceof ReferenceBinding) {
        ReferenceBinding referenceCast = (ReferenceBinding) typeCast;
        if (!referenceCast.canBeSeenBy(scope)) {
          scope.problemReporter().invalidType(this,
              new ProblemReferenceBinding(
                  CharOperation.splitOn('.', referenceCast.shortReadableName()),
                  referenceCast,
                  ProblemReasons.NotVisible));
        }
      }
View Full Code Here

TOP

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

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.