/** * Returns a deep clone of this {@link ATypeImportIR} node. * @return a deep clone of this {@link ATypeImportIR} node */ public ATypeImportIR clone() { return new ATypeImportIR( _sourceNode, _tag, _metaData, _name, _renamed, _fromModuleName, cloneNode(_decl) ); }
/** * Creates a deep clone of this {@link ATypeImportIR} 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 ATypeImportIR} node */ public ATypeImportIR clone(Map<INode,INode> oldToNewMap) { ATypeImportIR node = new ATypeImportIR( _sourceNode, _tag, _metaData, _name, _renamed, _fromModuleName, cloneNode(_decl, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
@Override public SImportIR caseATypeImport(ATypeImport node, IRInfo question) throws AnalysisException { ATypeImportIR typeImportCg = new ATypeImportIR(); initImport(node, typeImportCg); SDeclIR typeDeclCg = node.getDef() != null ? node.getDef().apply(question.getDeclVisitor(), question) : null; if (typeDeclCg instanceof ATypeDeclIR) { typeImportCg.setDecl((ATypeDeclIR) typeDeclCg); } return typeImportCg; }