/** * Returns a deep clone of this {@link AImportedDefinition} node. * @return a deep clone of this {@link AImportedDefinition} node */ public AImportedDefinition clone() { return new AImportedDefinition( _location, _nameScope, _used, _classDefinition, cloneNode(_access), _type, _pass, _def, (ILexNameToken)_name ); }
/** * Creates a deep clone of this {@link AImportedDefinition} 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 AImportedDefinition} node */ public AImportedDefinition clone(Map<INode,INode> oldToNewMap) { AImportedDefinition node = new AImportedDefinition( _location, _nameScope, _used, _classDefinition, cloneNode(_access, oldToNewMap), _type, _pass, _def, (ILexNameToken)_name ); oldToNewMap.put(this, node); return node; }
public static AImportedDefinition newAImportedDefinition( ILexLocation location, PDefinition d) { AImportedDefinition result = new AImportedDefinition(); initDefinition(result, Pass.DEFS, location, d.getName(), d.getNameScope()); result.setDef(d); return result; }