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

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


    }
    return false;
  }

  public boolean isClosedInFinallyOfEnclosing(BlockScope scope) {
    BlockScope currentScope = scope;
    while (true) {     
      if (currentScope.finallyInfo != null
          && currentScope.finallyInfo.isDefinitelyNonNull(this.binding)) {
        return true; // closed in enclosing finally
      }
View Full Code Here


  public void resolve(ClassScope scope) {
    internalResolve(scope, scope.enclosingSourceType().isStatic());
  }

  public void resolveAnnotations(Scope scope) {
    BlockScope resolutionScope = Scope.typeAnnotationsResolutionScope(scope);
    if (resolutionScope != null) {
      AnnotationBinding [] annotationBindings = resolveAnnotations(resolutionScope, this.annotations, this.binding, false);
      if (annotationBindings != null && annotationBindings.length > 0) {
        this.binding.setTypeAnnotations(annotationBindings, scope.environment().globalOptions.isAnnotationBasedNullAnalysisEnabled);
        scope.referenceCompilationUnit().compilationResult.hasAnnotations = true;
View Full Code Here

public abstract void traverse(ASTVisitor visitor, ClassScope scope);

protected void resolveAnnotations(Scope scope, int location) {
  Annotation[][] annotationsOnDimensions = getAnnotationsOnDimensions();
  if (this.annotations != null || annotationsOnDimensions != null) {
    BlockScope resolutionScope = Scope.typeAnnotationsResolutionScope(scope);
    if (resolutionScope != null) {
      int dimensions = this.dimensions();
      if (this.annotations != null) {
        TypeBinding leafComponentType = this.resolvedType.leafComponentType();
        leafComponentType = resolveAnnotations(resolutionScope, this.annotations, leafComponentType);
View Full Code Here

        trackingVar = trackingVar.outerTracker;
      } else if (atExit) {
        // at an exit point we report against inner despite a wrapper that may/may not be closed later
        break;
      } else {
        BlockScope outerTrackerScope = trackingVar.outerTracker.binding.declaringScope;
        if (outerTrackerScope == scope) {
          // outerTracker is from same scope and already processed -> pick trackingVar now
          break;
        } else {
          // outer resource is from other (outer?) scope
View Full Code Here

    }
    return false;
  }

  public boolean isClosedInFinallyOfEnclosing(BlockScope scope) {
    BlockScope currentScope = scope;
    while (true) {     
      if (currentScope.finallyInfo != null
          && currentScope.finallyInfo.isDefinitelyNonNull(this.binding)) {
        return true; // closed in enclosing finally
      }
View Full Code Here

    return output;
  }

  public void resolve(BlockScope upperScope) {
    // use the scope that will hold the init declarations
    this.scope = new BlockScope(upperScope);
    this.elementVariable.resolve(this.scope); // collection expression can see itemVariable
    TypeBinding elementType = this.elementVariable.type.resolvedType;
    TypeBinding collectionType = this.collection == null ? null : this.collection.resolveType(upperScope);

    TypeBinding expectedCollectionType = null;
View Full Code Here

          // handle the error case inside an explicit constructor call (see MethodScope>>findField)
          MethodScope methodScope = (MethodScope) currentScope;
          staticsOnly |= methodScope.isStatic | methodScope.isConstructorCall;
          //$FALL-THROUGH$
        case Scope.BLOCK_SCOPE :
          BlockScope blockScope = (BlockScope) currentScope;

          next : for (int i = 0, length = blockScope.locals.length; i < length; i++) {
            LocalVariableBinding local = blockScope.locals[i];

            if (local == null)
View Full Code Here

    return output;
  }

  public void resolve(BlockScope upperScope) {
    // use the scope that will hold the init declarations
    this.scope = new BlockScope(upperScope);
    this.elementVariable.resolve(this.scope); // collection expression can see itemVariable
    TypeBinding elementType = this.elementVariable.type.resolvedType;
    TypeBinding collectionType = this.collection == null ? null : this.collection.resolveType(this.scope);

    TypeBinding expectedCollectionType = null;
View Full Code Here

        trackingVar = trackingVar.outerTracker;
      } else if (atExit) {
        // at an exit point we report against inner despite a wrapper that may/may not be closed later
        break;
      } else {
        BlockScope outerTrackerScope = trackingVar.outerTracker.binding.declaringScope;
        if (outerTrackerScope == scope) {
          // outerTracker is from same scope and already processed -> pick trackingVar now
          break;
        } else {
          // outer resource is from other (outer?) scope
View Full Code Here

    }
    return false;
  }

  public boolean isClosedInFinallyOfEnclosing(BlockScope scope) {
    BlockScope currentScope = scope;
    while (true) {     
      if (currentScope.finallyInfo != null
          && currentScope.finallyInfo.isDefinitelyNonNull(this.binding)) {
        return true; // closed in enclosing finally
      }
View Full Code Here

TOP

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

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.