/** * Returns a deep clone of this {@link ACatchClauseDeclIR} node. * @return a deep clone of this {@link ACatchClauseDeclIR} node */ public ACatchClauseDeclIR clone() { return new ACatchClauseDeclIR( _sourceNode, _tag, _metaData, cloneNode(_type), _name, cloneNode(_stm) ); }
/** * Called by the {@link ACatchClauseDeclIR} node from {@link ACatchClauseDeclIR#apply(IIsaAnalysis)}. * @param node the calling {@link ACatchClauseDeclIR} node */ public void caseACatchClauseDeclIR(ACatchClauseDeclIR node) throws AnalysisException { _visitedNodes.add(node); inACatchClauseDeclIR(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } outACatchClauseDeclIR(node); }
/** * Creates a new complete constructor {@code ACatchClauseDeclIR} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ACatchClauseDeclIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link ACatchClauseDeclIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ACatchClauseDeclIR} node */ public ACatchClauseDeclIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, STypeIR type_, String name_, SStmIR stm_) { super(sourceNode_,tag_,metaData_); this.setType(type_); this.setName(name_); this.setStm(stm_); }
private ACatchClauseDeclIR consTcFailHandling() { AExternalTypeIR externalType = new AExternalTypeIR(); externalType.setName(ASSERTION_ERROR_TYPE); ACatchClauseDeclIR catchClause = new ACatchClauseDeclIR(); catchClause.setType(externalType); catchClause.setName(ASSERTION_ERROR_PARAM); AReturnStmIR retFalse = new AReturnStmIR(); retFalse.setExp(traceTrans.getTransAssist().getInfo().getExpAssistant().consBoolLiteral(false)); catchClause.setStm(retFalse); return catchClause; } }
/** * Called by the {@link ATryStmIR} node from {@link ATryStmIR#apply(IAnalysis)}. * @param node the calling {@link ATryStmIR} node */ public void caseATryStmIR(ATryStmIR node) throws AnalysisException { _visitedNodes.add(node); inATryStmIR(node); if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } { List<ACatchClauseDeclIR> copy = new ArrayList<ACatchClauseDeclIR>(node.getCatchClauses()); for( ACatchClauseDeclIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getFinally() != null && !_visitedNodes.contains(node.getFinally())) { node.getFinally().apply(this); } outATryStmIR(node); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof ACatchClauseDeclIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link ATryStmIR} node from {@link ATryStmIR#apply(IAnalysis)}. * @param node the calling {@link ATryStmIR} node */ public void caseATryStmIR(ATryStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inATryStmIR(node, question); if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this, question); } { List<ACatchClauseDeclIR> copy = new ArrayList<ACatchClauseDeclIR>(node.getCatchClauses()); for( ACatchClauseDeclIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } if(node.getFinally() != null && !_visitedNodes.contains(node.getFinally())) { node.getFinally().apply(this, question); } outATryStmIR(node, question); }
/** * Called by the {@link ACatchClauseDeclIR} node from {@link ACatchClauseDeclIR#apply(IAnalysis)}. * @param node the calling {@link ACatchClauseDeclIR} node */ public void caseACatchClauseDeclIR(ACatchClauseDeclIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inACatchClauseDeclIR(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this, question); } outACatchClauseDeclIR(node, question); }
/** * Creates a new tree field only constructor {@code ACatchClauseDeclIR TAG=catchClause} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ACatchClauseDeclIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link ACatchClauseDeclIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ACatchClauseDeclIR} node */ public ACatchClauseDeclIR(STypeIR type_, String name_, SStmIR stm_) { super(null,null,null); this.setType(type_); this.setName(name_); this.setStm(stm_); }
/** * Called by the {@link ATryStmIR} node from {@link ATryStmIR#apply(IIsaAnalysis)}. * @param node the calling {@link ATryStmIR} node */ public void caseATryStmIR(ATryStmIR node) throws AnalysisException { _visitedNodes.add(node); inATryStmIR(node); if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } { List<ACatchClauseDeclIR> copy = new ArrayList<ACatchClauseDeclIR>(node.getCatchClauses()); for( ACatchClauseDeclIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getFinally() != null && !_visitedNodes.contains(node.getFinally())) { node.getFinally().apply(this); } outATryStmIR(node); }
/** * Creates a deep clone of this {@link ACatchClauseDeclIR} 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 ACatchClauseDeclIR} node */ public ACatchClauseDeclIR clone(Map<INode,INode> oldToNewMap) { ACatchClauseDeclIR node = new ACatchClauseDeclIR( _sourceNode, _tag, _metaData, cloneNode(_type, oldToNewMap), _name, cloneNode(_stm, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Called by the {@link ACatchClauseDeclIR} node from {@link ACatchClauseDeclIR#apply(IAnalysis)}. * @param node the calling {@link ACatchClauseDeclIR} node */ public void caseACatchClauseDeclIR(ACatchClauseDeclIR node) throws AnalysisException { _visitedNodes.add(node); inACatchClauseDeclIR(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } outACatchClauseDeclIR(node); }
/** * Called by the {@link ATryStmIR} node from {@link ATryStmIR#apply(IAnalysis)}. * @param node the calling {@link ATryStmIR} node */ public A caseATryStmIR(ATryStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inATryStmIR(node, question)); if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this, question)); } { List<ACatchClauseDeclIR> copy = new ArrayList<ACatchClauseDeclIR>(node.getCatchClauses()); for( ACatchClauseDeclIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } if(node.getFinally() != null && !_visitedNodes.contains(node.getFinally())) { mergeReturns(retVal,node.getFinally().apply(this, question)); } mergeReturns(retVal,outATryStmIR(node, question)); return retVal; }
/** * Called by the {@link ACatchClauseDeclIR} node from {@link ACatchClauseDeclIR#apply(IAnalysis)}. * @param node the calling {@link ACatchClauseDeclIR} node */ public A caseACatchClauseDeclIR(ACatchClauseDeclIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inACatchClauseDeclIR(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this)); } mergeReturns(retVal,outACatchClauseDeclIR(node)); return retVal; }
/** * Called by the {@link ATryStmIR} node from {@link ATryStmIR#apply(IAnalysis)}. * @param node the calling {@link ATryStmIR} node */ public A caseATryStmIR(ATryStmIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inATryStmIR(node)); if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this)); } { List<ACatchClauseDeclIR> copy = new ArrayList<ACatchClauseDeclIR>(node.getCatchClauses()); for( ACatchClauseDeclIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } if(node.getFinally() != null && !_visitedNodes.contains(node.getFinally())) { mergeReturns(retVal,node.getFinally().apply(this)); } mergeReturns(retVal,outATryStmIR(node)); return retVal; }
/** * Called by the {@link ACatchClauseDeclIR} node from {@link ACatchClauseDeclIR#apply(IAnalysis)}. * @param node the calling {@link ACatchClauseDeclIR} node */ public A caseACatchClauseDeclIR(ACatchClauseDeclIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inACatchClauseDeclIR(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this, question)); } mergeReturns(retVal,outACatchClauseDeclIR(node, question)); return retVal; }