/** * Creates a deep clone of this {@link ATrapStm} 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 ATrapStm} node */ public ATrapStm clone(Map<INode,INode> oldToNewMap) { ATrapStm node = new ATrapStm( _location, _type, cloneNode(_patternBind, oldToNewMap), cloneNode(_with, oldToNewMap), cloneNode(_body, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link ATrapStm} node. * @return a deep clone of this {@link ATrapStm} node */ public ATrapStm clone() { return new ATrapStm( _location, _type, cloneNode(_patternBind), cloneNode(_with), cloneNode(_body) ); }
public static ATrapStm newATrapStm(ILexLocation token, ADefPatternBind patternBind, PStm with, PStm body) { ATrapStm result = new ATrapStm(); initStatement(result, token); result.setPatternBind(patternBind); result.setWith(with); result.setBody(body); return result; }