@Override public List<PDefinition> caseAImportedDefinition(AImportedDefinition node) throws AnalysisException { List<PDefinition> result = new Vector<PDefinition>(); result.add(node.getDef()); return result; }
/** * 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 ); }
inAImportedDefinition(node); if(node.getName() != null ) node.getName().apply(this); if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) node.getClassDefinition().apply(this); if(node.getAccess() != null && !_visitedNodes.contains(node.getAccess())) node.getAccess().apply(this); if(node.getType() != null && !_visitedNodes.contains(node.getType())) node.getType().apply(this); if(node.getDef() != null && !_visitedNodes.contains(node.getDef())) node.getDef().apply(this); if(node.getName() != null ) node.getName().apply(this);
@Override public NameValuePairList caseAImportedDefinition(AImportedDefinition def, Context initialContext) throws AnalysisException { NameValuePairList renamed = new NameValuePairList(); for (NameValuePair nv : af.createPDefinitionAssistant().getNamedValues(def.getDef(), initialContext)) { if (nv.name.equals(def.getDef().getName())) // NB. excludes pre/post/inv functions { renamed.add(new NameValuePair(def.getName(), nv.value)); } } return renamed; }
@Override public PDefinition caseAImportedDefinition(AImportedDefinition node, Newquestion question) throws AnalysisException { // We can only find an import if it is being sought from the module that // imports it. if (question.fromModule != null && !node.getLocation().getModule().equals(question.fromModule)) { return null; // Someone else's import } PDefinition def = af.createPDefinitionAssistant().findType(node.getDef(), question.sought, question.fromModule); if (def != null) { af.createPDefinitionAssistant().markUsed(node); } return def; }
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; }
inAImportedDefinition(node, question); if(node.getName() != null ) node.getName().apply(this, question); if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) node.getClassDefinition().apply(this, question); if(node.getAccess() != null && !_visitedNodes.contains(node.getAccess())) node.getAccess().apply(this, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) node.getType().apply(this, question); if(node.getDef() != null && !_visitedNodes.contains(node.getDef())) node.getDef().apply(this, question); if(node.getName() != null ) node.getName().apply(this, question);
inAImportedDefinition(node); if(node.getName() != null ) node.getName().apply(this); if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) node.getClassDefinition().apply(this); if(node.getAccess() != null && !_visitedNodes.contains(node.getAccess())) node.getAccess().apply(this); if(node.getType() != null && !_visitedNodes.contains(node.getType())) node.getType().apply(this); if(node.getDef() != null && !_visitedNodes.contains(node.getDef())) node.getDef().apply(this); if(node.getName() != null ) node.getName().apply(this);
@Override public Boolean caseAImportedDefinition(AImportedDefinition def) throws AnalysisException { return def.getDef().apply(THIS); }
/** * 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; }
mergeReturns(retVal,inAImportedDefinition(node)); if(node.getName() != null ) mergeReturns(retVal,node.getName().apply(this)); if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) mergeReturns(retVal,node.getClassDefinition().apply(this)); if(node.getAccess() != null && !_visitedNodes.contains(node.getAccess())) mergeReturns(retVal,node.getAccess().apply(this)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) mergeReturns(retVal,node.getType().apply(this)); if(node.getDef() != null && !_visitedNodes.contains(node.getDef())) mergeReturns(retVal,node.getDef().apply(this)); if(node.getName() != null ) mergeReturns(retVal,node.getName().apply(this));
public void caseAImportedDefinition(AImportedDefinition node, NewQuestion question) throws AnalysisException { node.getDef().apply(this, question); }
mergeReturns(retVal,inAImportedDefinition(node, question)); if(node.getName() != null ) mergeReturns(retVal,node.getName().apply(this, question)); if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) mergeReturns(retVal,node.getClassDefinition().apply(this, question)); if(node.getAccess() != null && !_visitedNodes.contains(node.getAccess())) mergeReturns(retVal,node.getAccess().apply(this, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) mergeReturns(retVal,node.getType().apply(this, question)); if(node.getDef() != null && !_visitedNodes.contains(node.getDef())) mergeReturns(retVal,node.getDef().apply(this, question)); if(node.getName() != null ) mergeReturns(retVal,node.getName().apply(this, question));
@Override public PType caseAImportedDefinition(AImportedDefinition node) throws AnalysisException { return ((AImportedDefinition) node).getDef().apply(THIS); }
@Override public Boolean caseAImportedDefinition(AImportedDefinition node) throws AnalysisException { return node.getDef().apply(THIS); }
@Override public Boolean caseAImportedDefinition(AImportedDefinition def) throws AnalysisException { return def.getDef().apply(THIS); }
@Override public PDefinition caseAImportedDefinition(AImportedDefinition node) throws AnalysisException { return node.getDef().apply(THIS); }
@Override public Boolean caseAImportedDefinition(AImportedDefinition def) throws AnalysisException { return def.getDef().apply(THIS); }