/** * Returns a deep clone of this {@link AValueDefinition} node. * @return a deep clone of this {@link AValueDefinition} node */ public AValueDefinition clone() { return new AValueDefinition( _location, _name, _nameScope, _used, _classDefinition, cloneNode(_access), _type, _pass, cloneNode(_pattern), cloneNode(_expression), cloneList(_defs), _expType ); }
/** * Creates a deep clone of this {@link AValueDefinition} 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 AValueDefinition} node */ public AValueDefinition clone(Map<INode,INode> oldToNewMap) { AValueDefinition node = new AValueDefinition( _location, _name, _nameScope, _used, _classDefinition, cloneNode(_access, oldToNewMap), _type, _pass, cloneNode(_pattern, oldToNewMap), cloneNode(_expression, oldToNewMap), cloneList(_defs, oldToNewMap), _expType ); oldToNewMap.put(this, node); return node; }