/** * Returns a deep clone of this {@link ARenamedDefinition} node. * @return a deep clone of this {@link ARenamedDefinition} node */ public ARenamedDefinition clone() { return new ARenamedDefinition( _location, _name, _nameScope, _used, _classDefinition, cloneNode(_access), _type, _pass, _def ); }
/** * Creates a deep clone of this {@link ARenamedDefinition} 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 ARenamedDefinition} node */ public ARenamedDefinition clone(Map<INode,INode> oldToNewMap) { ARenamedDefinition node = new ARenamedDefinition( _location, _name, _nameScope, _used, _classDefinition, cloneNode(_access, oldToNewMap), _type, _pass, _def ); oldToNewMap.put(this, node); return node; }
public static ARenamedDefinition newARenamedDefinition(ILexNameToken name, PDefinition def) { ARenamedDefinition result = new ARenamedDefinition(); initDefinition(result, def.getPass(), name.getLocation(), name, def.getNameScope()); result.setDef(def); return result; }