/** * Returns a deep clone of this {@link AFunctionValueImportIR} node. * @return a deep clone of this {@link AFunctionValueImportIR} node */ public AFunctionValueImportIR clone() { return new AFunctionValueImportIR( _sourceNode, _tag, _metaData, _name, _renamed, _fromModuleName, _importType, cloneList(_typeParams) ); }
/** * Creates a new tree field only constructor {@code AFunctionValueImportIR TAG=function} 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 typeParams_ the {@link NodeList} node for the {@code typeParams} child of this {@link AFunctionValueImportIR} node */ public AFunctionValueImportIR(String name_, String renamed_, String fromModuleName_, List<? extends ATokenNameIR> typeParams_) { super(null,null,null,name_,renamed_,fromModuleName_,null); this.setTypeParams(typeParams_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof AFunctionValueImportIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link AFunctionValueImportIR} node from {@link AFunctionValueImportIR#apply(IAnalysis)}. * @param node the calling {@link AFunctionValueImportIR} node */ public void caseAFunctionValueImportIR(AFunctionValueImportIR node) throws AnalysisException { _visitedNodes.add(node); inAFunctionValueImportIR(node); if(node.getImportType() != null && !_visitedNodes.contains(node.getImportType())) { node.getImportType().apply(this); } { List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getTypeParams()); for( ATokenNameIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outAFunctionValueImportIR(node); }
@Override public SImportIR caseAFunctionValueImport(AFunctionValueImport node, IRInfo question) throws AnalysisException { AFunctionValueImportIR funcImportCg = new AFunctionValueImportIR(); initValueImport(node, funcImportCg, question); for (ILexNameToken typeParam : node.getTypeParams()) { ATokenNameIR nameCg = new ATokenNameIR(); nameCg.setName(typeParam.getName()); funcImportCg.getTypeParams().add(nameCg); } return funcImportCg; }
/** * Called by the {@link AFunctionValueImportIR} node from {@link AFunctionValueImportIR#apply(IIsaAnalysis)}. * @param node the calling {@link AFunctionValueImportIR} node */ public void caseAFunctionValueImportIR(AFunctionValueImportIR node) throws AnalysisException { _visitedNodes.add(node); inAFunctionValueImportIR(node); if(node.getImportType() != null && !_visitedNodes.contains(node.getImportType())) { node.getImportType().apply(this); } { List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getTypeParams()); for( ATokenNameIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outAFunctionValueImportIR(node); }
/** * Called by the {@link AFunctionValueImportIR} node from {@link AFunctionValueImportIR#apply(IAnalysis)}. * @param node the calling {@link AFunctionValueImportIR} node */ public void caseAFunctionValueImportIR(AFunctionValueImportIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inAFunctionValueImportIR(node, question); if(node.getImportType() != null && !_visitedNodes.contains(node.getImportType())) { node.getImportType().apply(this, question); } { List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getTypeParams()); for( ATokenNameIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } outAFunctionValueImportIR(node, question); }
/** * Creates a deep clone of this {@link AFunctionValueImportIR} 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 AFunctionValueImportIR} node */ public AFunctionValueImportIR clone(Map<INode,INode> oldToNewMap) { AFunctionValueImportIR node = new AFunctionValueImportIR( _sourceNode, _tag, _metaData, _name, _renamed, _fromModuleName, _importType, cloneList(_typeParams, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Creates a new complete constructor {@code AFunctionValueImportIR} 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 typeParams_ the {@link NodeList} node for the {@code typeParams} child of this {@link AFunctionValueImportIR} node */ public AFunctionValueImportIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, String name_, String renamed_, String fromModuleName_, STypeIR importType_, List<? extends ATokenNameIR> typeParams_) { super(sourceNode_,tag_,metaData_,name_,renamed_,fromModuleName_,importType_); this.setTypeParams(typeParams_); }
/** * Called by the {@link AFunctionValueImportIR} node from {@link AFunctionValueImportIR#apply(IAnalysis)}. * @param node the calling {@link AFunctionValueImportIR} node */ public A caseAFunctionValueImportIR(AFunctionValueImportIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAFunctionValueImportIR(node, question)); if(node.getImportType() != null && !_visitedNodes.contains(node.getImportType())) { mergeReturns(retVal,node.getImportType().apply(this, question)); } { List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getTypeParams()); for( ATokenNameIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } mergeReturns(retVal,outAFunctionValueImportIR(node, question)); return retVal; }
/** * Called by the {@link AFunctionValueImportIR} node from {@link AFunctionValueImportIR#apply(IAnalysis)}. * @param node the calling {@link AFunctionValueImportIR} node */ public A caseAFunctionValueImportIR(AFunctionValueImportIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAFunctionValueImportIR(node)); if(node.getImportType() != null && !_visitedNodes.contains(node.getImportType())) { mergeReturns(retVal,node.getImportType().apply(this)); } { List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getTypeParams()); for( ATokenNameIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } mergeReturns(retVal,outAFunctionValueImportIR(node)); return retVal; }