Examples of Try


Examples of cn.wensiqun.asmsupport.block.control.Try

    return null;
  }

  @Override
  protected boolean triggerCondition() {
    Try tryBlock = directTryBlock(getExecuteBlock());
    if(tryBlock != null){
      finallyBlock = tryBlock.getFinallyBlock();
      if(finallyBlock != null){
        return true;
      }else{
        return false;
      }
View Full Code Here

Examples of cn.wensiqun.asmsupport.block.control.Try

      }
        new BlockEndFlag(pb);
    }
   
    public void tiggerTryCatchPrepare(){
      Try nearlyTryBlock = getMethod().getNearlyTryBlock();
      //获取离当操作前最近try程序块
    if(nearlyTryBlock != null){
           
      getMethod().setNearlyTryBlock(null);
      //try prepare
     
      nearlyTryBlock.prepare();
     
      //catch prepare
      Catch catchBlock = nearlyTryBlock.getCatchEntity();
     
      Finally finallyBlock = nearlyTryBlock.getFinallyBlock();
     
      while(catchBlock != null){
        catchBlock.prepare();
        catchBlock = catchBlock.getNextCatch();
      }
View Full Code Here

Examples of flash.swf.actions.Try

        else
        {
            switch (entry.source.code)
            {
            case ActionConstants.sactionTry:
                Try t = (Try) entry.source;
                indent--;
                indent();
                out.println("}");
                indent();
                if (label == t.endTry && t.hasCatch())
                {
                    out.println("catch("+
                                (t.hasRegister()?"$"+t.catchReg:t.catchName) +
                                ") {");
                    indent++;
                }
                else if ((label == t.endTry || label == t.endCatch) && t.hasFinally())
                {
                    out.println("finally {");
                    indent++;
                }
                break;
View Full Code Here

Examples of flash.swf.actions.Try

        factory.setAction(offset, a);
  }

    private Try decodeTry(ActionFactory factory) throws IOException
    {
        Try a = new Try();

        a.flags = reader.readUI8();
        int trySize = reader.readUI16();
        int catchSize = reader.readUI16();
        int finallySize = reader.readUI16();

    if (a.hasRegister())
      a.catchReg = reader.readUI8();
    else
           a.catchName = reader.readString();

    // we have now consumed the try action.  what follows is label mgmt

        int tryEnd = reader.getOffset() + trySize;
    a.endTry = factory.getLabel(tryEnd);

        // place the catchLabel to mark the end point of the catch handler
    if (a.hasCatch())
            a.endCatch = factory.getLabel(tryEnd + catchSize);

        // place the finallyLabel to mark the end point of the finally handler
    if (a.hasFinally())
            a.endFinally = factory.getLabel(tryEnd + finallySize + (a.hasCatch() ? catchSize : 0));

        return a;
    }
View Full Code Here

Examples of flash.swf.actions.Try

            case ActionConstants.sactionWaitForFrame2:
                int skipTarget = getLabelCount(((WaitForFrame)entry.source).skipTarget);
                writer.writeUI8at(entry.updatePos, skipTarget - entry.anchor);
                break;
            case ActionConstants.sactionTry:
                Try t = (Try) entry.source;
                int endTry = getLabelOffset(t.endTry);
                writer.writeUI16at(entry.updatePos, endTry - entry.anchor);
                entry.anchor = endTry;
                if (t.hasCatch())
                {
                    int endCatch = getLabelOffset(t.endCatch);
                    writer.writeUI16at(entry.updatePos+2, endCatch - entry.anchor);
                    entry.anchor = endCatch;
                }
                if (t.hasFinally())
                {
                    int endFinally = getLabelOffset(t.endFinally);
                    writer.writeUI16at(entry.updatePos+4, endFinally - entry.anchor);
                }
                break;
View Full Code Here

Examples of lombok.ast.Try

    if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
    return posify(new Catch().rawExceptionDeclaration(decl).rawBody(body));
  }
 
  public Node createTryStatement(Node body, List<Node> catches, Node finallyBody) {
    Try result = new Try().rawBody(body).rawFinally(finallyBody);
    if (catches != null) for (Node c : catches) if (c != null) result.rawCatches().addToEnd(c);
    return posify(result);
  }
View Full Code Here

Examples of lombok.ast.Try

      setConversionPositionInfo(s, "()", getPosition(cond));
      set(node, s.rawLock(toTree(removeParens(cond))).rawBody(toTree(node.getBlock())));
    }
   
    @Override public void visitTry(JCTry node) {
      Try t = new Try();
      t.rawBody(toTree(node.getBlock()));
      t.rawFinally(toTree(node.getFinallyBlock()));
      fillList(node.getCatches(), t.rawCatches());
      set(node, t);
    }
View Full Code Here

Examples of org.candle.decompiler.intermediate.graph.enhancer.Try

    enhancers.add(new CaseEndRangeIntermediateVisitor(igc));
    enhancers.add(new RemoveCaseToCaseEdge(igc));

    enhancers.add(new WhileRangeVisitor(igc));
    enhancers.add(new IfLowerRangeVisitor(igc));
    enhancers.add(new Try(igc));
   
    enhancers.add(new RemoveImpliedVoidReturn(igc));
    enhancers.add(new ExpressionEnhancer(igc));
    enhancers.add(new IntermediateGraphWriter(igc, "iafter.dot"));
   
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Try

        imageProvider.addIconsForClass(new Threads());
        imageProvider.addIconsForClass(new Throttle());
        imageProvider.addIconsForClass(new ThrowException());
        imageProvider.addIconsForClass(new Transacted());
        imageProvider.addIconsForClass(new Transform());
        imageProvider.addIconsForClass(new Try());
        imageProvider.addIconsForClass(new Unmarshal());
        imageProvider.addIconsForClass(new Validate());
        imageProvider.addIconsForClass(new When());
        imageProvider.addIconsForClass(new WireTap());
    }
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Try

    Endpoint ep3 = new Endpoint();
    ep3.setUri("seda:c");
    Endpoint ep4 = new Endpoint();
    ep4.setUri("seda:d");

    Try t = new Try();
    ep1.addTargetNode(t);

    Finally fin = new Finally();
    t.addTargetNode(fin);
    Catch c = new Catch();
    t.addTargetNode(c);
    t.addTargetNode(ep2);
    t.addTargetNode(ep3);

    Endpoint e2 = assertOutput(t, 0, Endpoint.class);
    assertEquals("e2", "seda:b", e2.getUri());

    Endpoint e3 = assertOutput(t, 1, Endpoint.class);
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.