/** * Returns a deep clone of this {@link AStringPattern} node. * @return a deep clone of this {@link AStringPattern} node */ public AStringPattern clone() { return new AStringPattern( _location, cloneList(_definitions), _resolved, cloneNode(_value) ); }
/** * Creates a deep clone of this {@link AStringPattern} 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 AStringPattern} node */ public AStringPattern clone(Map<INode,INode> oldToNewMap) { AStringPattern node = new AStringPattern( _location, cloneList(_definitions, oldToNewMap), _resolved, cloneNode(_value, oldToNewMap) ); oldToNewMap.put(this, node); return node; }