/** * 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 new complete constructor {@code ATypeImportIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param decl_ the {@link ATypeDeclIR} node for the {@code decl} child of this {@link ATypeImportIR} node */ public ATypeImportIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, String name_, String renamed_, String fromModuleName_, ATypeDeclIR decl_) { super(sourceNode_,tag_,metaData_,name_,renamed_,fromModuleName_); this.setDecl(decl_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof ATypeImportIR) { return toString().equals(o.toString()); } return false; }
@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; }
/** * Called by the {@link ATypeImportIR} node from {@link ATypeImportIR#apply(IAnalysis)}. * @param node the calling {@link ATypeImportIR} node */ public void caseATypeImportIR(ATypeImportIR node) throws AnalysisException { _visitedNodes.add(node); inATypeImportIR(node); if(node.getDecl() != null && !_visitedNodes.contains(node.getDecl())) { node.getDecl().apply(this); } outATypeImportIR(node); }
/** * Called by the {@link ATypeImportIR} node from {@link ATypeImportIR#apply(IIsaAnalysis)}. * @param node the calling {@link ATypeImportIR} node */ public void caseATypeImportIR(ATypeImportIR node) throws AnalysisException { _visitedNodes.add(node); inATypeImportIR(node); if(node.getDecl() != null && !_visitedNodes.contains(node.getDecl())) { node.getDecl().apply(this); } outATypeImportIR(node); }
/** * Called by the {@link ATypeImportIR} node from {@link ATypeImportIR#apply(IAnalysis)}. * @param node the calling {@link ATypeImportIR} node */ public void caseATypeImportIR(ATypeImportIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inATypeImportIR(node, question); if(node.getDecl() != null && !_visitedNodes.contains(node.getDecl())) { node.getDecl().apply(this, question); } outATypeImportIR(node, question); }
/** * 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; }
/** * Creates a new tree field only constructor {@code ATypeImportIR TAG=type} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param decl_ the {@link ATypeDeclIR} node for the {@code decl} child of this {@link ATypeImportIR} node */ public ATypeImportIR(String name_, String renamed_, String fromModuleName_, ATypeDeclIR decl_) { super(null,null,null,name_,renamed_,fromModuleName_); this.setDecl(decl_); }
/** * Called by the {@link ATypeImportIR} node from {@link ATypeImportIR#apply(IAnalysis)}. * @param node the calling {@link ATypeImportIR} node */ public A caseATypeImportIR(ATypeImportIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inATypeImportIR(node)); if(node.getDecl() != null && !_visitedNodes.contains(node.getDecl())) { mergeReturns(retVal,node.getDecl().apply(this)); } mergeReturns(retVal,outATypeImportIR(node)); return retVal; }
/** * Called by the {@link ATypeImportIR} node from {@link ATypeImportIR#apply(IAnalysis)}. * @param node the calling {@link ATypeImportIR} node */ public A caseATypeImportIR(ATypeImportIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inATypeImportIR(node, question)); if(node.getDecl() != null && !_visitedNodes.contains(node.getDecl())) { mergeReturns(retVal,node.getDecl().apply(this, question)); } mergeReturns(retVal,outATypeImportIR(node, question)); return retVal; }