Package org.aspectj.org.eclipse.jdt.internal.compiler.flow

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext


      // may be in a non necessary <clinit> for innerclass with static final constant fields
      if (binding.isAbstract() || binding.isNative())
        return;
     
      ExceptionHandlingFlowContext methodContext =
        new ExceptionHandlingFlowContext(
          initializationContext,
          this,
          binding.thrownExceptions,
          scope,
          FlowInfo.DEAD_END);

      // tag parameters as being set
      if (this.arguments != null) {
        for (int i = 0, count = this.arguments.length; i < count; i++) {
          flowInfo.markAsDefinitelyAssigned(this.arguments[i].binding);
        }
      }
      // propagate to statements
      if (statements != null) {
        boolean didAlreadyComplain = false;
        for (int i = 0, count = statements.length; i < count; i++) {
          Statement stat = statements[i];
          if (!stat.complainIfUnreachable(flowInfo, scope, didAlreadyComplain)) {
            flowInfo = stat.analyseCode(scope, methodContext, flowInfo);
          } else {
            didAlreadyComplain = true;
          }
        }
      }
      // check for missing returning path
      TypeBinding returnTypeBinding = binding.returnType;
      if ((returnTypeBinding == TypeBinding.VOID) || isAbstract()) {
        if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
          this.bits |= ASTNode.NeedFreeReturn;
        }
      } else {
        if (flowInfo != FlowInfo.DEAD_END) {
          scope.problemReporter().shouldReturn(returnTypeBinding, this);
        }
      }
      // check unreachable catch blocks
      methodContext.complainIfUnusedExceptionHandlers(this);
    } catch (AbortMethod e) {
      this.ignoreFurtherInvestigation = true;
    }
  }
View Full Code Here


    FlowInfo flowInfo) {

    if (ignoreFurtherInvestigation)
      return;
    try {
      ExceptionHandlingFlowContext clinitContext =
        new ExceptionHandlingFlowContext(
          staticInitializerFlowContext.parent,
          this,
          Binding.NO_EXCEPTIONS,
          scope,
          FlowInfo.DEAD_END);
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext

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.