Examples of IfNode


Examples of jadx.core.dex.instructions.IfNode

    InsnNode wrapInsn = ((InsnWrapArg) c.getA()).getWrapInsn();
    InsnType type = wrapInsn.getType();
    if (type != InsnType.CMP_L && type != InsnType.CMP_G) {
      return;
    }
    IfNode insn = c.getInsn();
    insn.changeCondition(insn.getOp(), wrapInsn.getArg(0), wrapInsn.getArg(1));
  }

Examples of jadx.core.dex.instructions.IfNode

import static org.junit.Assert.assertEquals;

public class TestIfCondition {

  private static IfCondition makeCondition(IfOp op, InsnArg a, InsnArg b) {
    return IfCondition.fromIfNode(new IfNode(op, -1, a, b));
  }

Examples of jadx.core.dex.instructions.IfNode

        break;

      /* fallback mode instructions */
      case IF:
        assert isFallback() : "if insn in not fallback mode";
        IfNode ifInsn = (IfNode) insn;
        code.add("if (");
        addArg(code, insn.getArg(0));
        code.add(' ');
        code.add(ifInsn.getOp().getSymbol()).add(' ');
        addArg(code, insn.getArg(1));
        code.add(") goto ").add(MethodGen.getLabelName(ifInsn.getTarget()));
        break;

      case GOTO:
        assert isFallback();
        code.add("goto ").add(MethodGen.getLabelName(((GotoNode) insn).getTarget()));

Examples of jadx.core.dex.instructions.IfNode

    return null;
  }

  private static InsnArg foundWrappedInsnInCondition(IfCondition cond, InsnNode insn) {
    if (cond.isCompare()) {
      IfNode cmpInsn = cond.getCompare().getInsn();
      return foundWrappedInsn(cmpInsn, insn);
    }
    for (IfCondition nestedCond : cond.getArgs()) {
      InsnArg res = foundWrappedInsnInCondition(nestedCond, insn);
      if (res != null) {

Examples of jadx.core.dex.instructions.IfNode

  }

  private static boolean isDoWhile(Map<Integer, BlockNode> blocksMap, BlockNode curBlock, InsnNode insn) {
    // split 'do-while' block (last instruction: 'if', target this block)
    if (insn.getType() == InsnType.IF) {
      IfNode ifs = (IfNode) (insn);
      BlockNode targetBlock = blocksMap.get(ifs.getTarget());
      if (targetBlock == curBlock) {
        return true;
      }
    }
    return false;

Examples of org.apache.airavata.workflow.model.graph.system.IfNode

    } else if (GraphSchema.NODE_TYPE_SPLIT.equals(type)) {
      node = new ForEachNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_MERGE.equals(type)) {
      node = new EndForEachNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_IF.equals(type)) {
      node = new IfNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_ENDIF.equals(type)) {
      node = new EndifNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_DOWHILE.equals(type)) {
      node = new DoWhileNode(nodeElement);
    } else if (GraphSchema.NODE_TYPE_ENDDOWHILE.equals(type)) {

Examples of org.apache.airavata.workflow.model.graph.system.IfNode

    /**
     * @see org.apache.airavata.workflow.model.component.Component#createNode(org.apache.airavata.workflow.model.graph.Graph)
     */
    @Override
    public Node createNode(Graph graph) {
        IfNode node = new IfNode(graph);

        node.setName(NAME);
        node.setComponent(this);

        // Creates a unique ID for the node. This has to be after setName().
        node.createID();

        createPorts(node);

        return node;
    }

Examples of org.apache.airavata.workflow.model.graph.system.IfNode

      }
    }
  }

  private void handleIf(Node node) throws WorkflowException {
    IfNode ifNode = (IfNode) node;

    /*
     * Get all input to check condition
     */
    String booleanExpression = ifNode.getXPath();
    if (booleanExpression == null) {
      throw new WorkFlowInterpreterException("XPath for if cannot be null");
    }

    List<DataPort> inputPorts = node.getInputPorts();

Examples of org.apache.airavata.workflow.model.graph.system.IfNode

      }
    }
  }

  private void handleIf(Node node) throws WorkflowException {
    IfNode ifNode = (IfNode) node;

    /*
     * Get all input to check condition
     */
    String booleanExpression = ifNode.getXPath();
    if (booleanExpression == null) {
      throw new WorkFlowInterpreterException("XPath for if cannot be null");
    }

    List<DataPort> inputPorts = node.getInputPorts();

Examples of org.apache.airavata.workflow.model.graph.system.IfNode

      }
    }
  }

  private void handleIf(Node node) throws WorkflowException {
    IfNode ifNode = (IfNode) node;

    /*
     * Get all input to check condition
     */
    String booleanExpression = ifNode.getXPath();
    if (booleanExpression == null) {
      throw new WorkFlowInterpreterException("XPath for if cannot be null");
    }

    List<DataPort> inputPorts = node.getInputPorts();
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.