/** * Creates a deep clone of this {@link ACasesStm} 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 ACasesStm} node */ public ACasesStm clone(Map<INode,INode> oldToNewMap) { ACasesStm node = new ACasesStm( _location, _type, cloneNode(_exp, oldToNewMap), cloneList(_cases, oldToNewMap), cloneNode(_others, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link ACasesStm} node. * @return a deep clone of this {@link ACasesStm} node */ public ACasesStm clone() { return new ACasesStm( _location, _type, cloneNode(_exp), cloneList(_cases), cloneNode(_others) ); }
public static ACasesStm newACasesStm(ILexLocation token, PExp exp, List<ACaseAlternativeStm> cases, PStm others) { ACasesStm result = new ACasesStm(); initStatement(result, token); result.setExp(exp); result.setCases(cases); result.setOthers(others); return result; }