void remove() { getExecution().removeHead(this); }
/** * Inserts the flow node that indicates the beginning of the body invocation. * * @see #addBodyStartFlowNode(FlowHead) */ private @Nonnull StepEndNode addBodyEndFlowNode() { try { FlowHead head = CpsThread.current().head; StepEndNode end = new StepEndNode(head.getExecution(), getBodyStartNode(), head.get()); head.getExecution().cacheNode(end); end.addAction(new BodyInvocationAction()); head.setNewHead(end); return end; } catch (IOException e) { LOGGER.log(WARNING, "Failed to grow the flow graph", e); throw new Error(e); } }
/** * Inserts the flow node that indicates the beginning of the body invocation. * * @see #addBodyEndFlowNode() */ private @Nonnull StepStartNode addBodyStartFlowNode(FlowHead head) { CpsFlowExecution.maybeAutoPersistNode(head.get()); StepStartNode start = new StepStartNode(head.getExecution(), context.getStepDescriptor(), head.get()); head.getExecution().cacheNode(start); this.startNodeId = start.getId(); start.addAction(new BodyInvocationAction()); return start; }