/** * Returns a deep clone of this {@link ADurationStmIR} node. * @return a deep clone of this {@link ADurationStmIR} node */ public ADurationStmIR clone() { return new ADurationStmIR( _sourceNode, _tag, _metaData, cloneNode(_duration), cloneNode(_stm) ); }
/** * Creates a new complete constructor {@code ADurationStmIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param duration_ the {@link SExpIR} node for the {@code duration} child of this {@link ADurationStmIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ADurationStmIR} node */ public ADurationStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR duration_, SStmIR stm_) { super(sourceNode_,tag_,metaData_); this.setDuration(duration_); this.setStm(stm_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof ADurationStmIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link ADurationStmIR} node from {@link ADurationStmIR#apply(IIsaAnalysis)}. * @param node the calling {@link ADurationStmIR} node */ public void caseADurationStmIR(ADurationStmIR node) throws AnalysisException { _visitedNodes.add(node); inADurationStmIR(node); if(node.getDuration() != null && !_visitedNodes.contains(node.getDuration())) { node.getDuration().apply(this); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } outADurationStmIR(node); }
@Override public SStmIR caseADurationStm(ADurationStm node, IRInfo question) throws AnalysisException { PExp duration = node.getDuration(); PStm stm = node.getStatement(); SExpIR durationCg = duration.apply(question.getExpVisitor(), question); SStmIR stmCg = stm.apply(question.getStmVisitor(), question); ADurationStmIR durStm = new ADurationStmIR(); durStm.setDuration(durationCg); durStm.setStm(stmCg); ; return durStm; }
/** * Called by the {@link ADurationStmIR} node from {@link ADurationStmIR#apply(IAnalysis)}. * @param node the calling {@link ADurationStmIR} node */ public void caseADurationStmIR(ADurationStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inADurationStmIR(node, question); if(node.getDuration() != null && !_visitedNodes.contains(node.getDuration())) { node.getDuration().apply(this, question); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this, question); } outADurationStmIR(node, question); }
/** * Called by the {@link ADurationStmIR} node from {@link ADurationStmIR#apply(IAnalysis)}. * @param node the calling {@link ADurationStmIR} node */ public void caseADurationStmIR(ADurationStmIR node) throws AnalysisException { _visitedNodes.add(node); inADurationStmIR(node); if(node.getDuration() != null && !_visitedNodes.contains(node.getDuration())) { node.getDuration().apply(this); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } outADurationStmIR(node); }
/** * Creates a new tree field only constructor {@code ADurationStmIR TAG=duration} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param duration_ the {@link SExpIR} node for the {@code duration} child of this {@link ADurationStmIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ADurationStmIR} node */ public ADurationStmIR(SExpIR duration_, SStmIR stm_) { super(null,null,null); this.setDuration(duration_); this.setStm(stm_); }
/** * Creates a deep clone of this {@link ADurationStmIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link ADurationStmIR} node */ public ADurationStmIR clone(Map<INode,INode> oldToNewMap) { ADurationStmIR node = new ADurationStmIR( _sourceNode, _tag, _metaData, cloneNode(_duration, oldToNewMap), cloneNode(_stm, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Called by the {@link ADurationStmIR} node from {@link ADurationStmIR#apply(IAnalysis)}. * @param node the calling {@link ADurationStmIR} node */ public A caseADurationStmIR(ADurationStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inADurationStmIR(node, question)); if(node.getDuration() != null && !_visitedNodes.contains(node.getDuration())) { mergeReturns(retVal,node.getDuration().apply(this, question)); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this, question)); } mergeReturns(retVal,outADurationStmIR(node, question)); return retVal; }
/** * Called by the {@link ADurationStmIR} node from {@link ADurationStmIR#apply(IAnalysis)}. * @param node the calling {@link ADurationStmIR} node */ public A caseADurationStmIR(ADurationStmIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inADurationStmIR(node)); if(node.getDuration() != null && !_visitedNodes.contains(node.getDuration())) { mergeReturns(retVal,node.getDuration().apply(this)); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this)); } mergeReturns(retVal,outADurationStmIR(node)); return retVal; }