/** * Creates a deep clone of this {@link AForAllStm} 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 AForAllStm} node */ public AForAllStm clone(Map<INode,INode> oldToNewMap) { AForAllStm node = new AForAllStm( _location, _type, cloneNode(_pattern, oldToNewMap), cloneNode(_set, oldToNewMap), cloneNode(_statement, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AForAllStm} node. * @return a deep clone of this {@link AForAllStm} node */ public AForAllStm clone() { return new AForAllStm( _location, _type, cloneNode(_pattern), cloneNode(_set), cloneNode(_statement) ); }
public static AForAllStm newAForAllStm(ILexLocation token, PPattern pattern, PExp set, PStm stmt) { AForAllStm result = new AForAllStm(); initStatement(result, token); result.setPattern(pattern); result.setSet(set); result.setStatement(stmt); return result; }