@Override public SExpIR caseAIsOfClassExp(AIsOfClassExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); AClassType classType = node.getClassType(); PExp objRef = node.getExp(); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); STypeIR classTypeCg = classType.apply(question.getTypeVisitor(), question); if (!(classTypeCg instanceof AClassTypeIR)) { log.error("Unexpected class type encountered for " + AIsOfClassExp.class.getName() + ". Expected class type: " + AClassTypeIR.class.getName() + ". Got: " + typeCg.getClass().getName() + " at " + node.getLocation()); } SExpIR objRefCg = objRef.apply(question.getExpVisitor(), question); AIsOfClassExpIR instanceOfExp = new AIsOfClassExpIR(); instanceOfExp.setType(typeCg); instanceOfExp.setCheckedType(classTypeCg); instanceOfExp.setExp(objRefCg); return instanceOfExp; }
/** * Called by the {@link AIsOfClassExp} node from {@link AIsOfClassExp#apply(IAnalysis)}. * @param node the calling {@link AIsOfClassExp} node */ public void caseAIsOfClassExp(AIsOfClassExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inAIsOfClassExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getClassName() != null ) { node.getClassName().apply(this, question); } if(node.getClassType() != null && !_visitedNodes.contains(node.getClassType())) { node.getClassType().apply(this, question); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } outAIsOfClassExp(node, question); }
/** * Called by the {@link AIsOfClassExp} node from {@link AIsOfClassExp#apply(IPOFAnalysis)}. * @param node the calling {@link AIsOfClassExp} node */ public void caseAIsOfClassExp(AIsOfClassExp node) throws AnalysisException { _visitedNodes.add(node); inAIsOfClassExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getClassName() != null ) { node.getClassName().apply(this); } if(node.getClassType() != null && !_visitedNodes.contains(node.getClassType())) { node.getClassType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outAIsOfClassExp(node); }
/** * Called by the {@link AIsOfClassExp} node from {@link AIsOfClassExp#apply(IAnalysis)}. * @param node the calling {@link AIsOfClassExp} node */ public void caseAIsOfClassExp(AIsOfClassExp node) throws AnalysisException { _visitedNodes.add(node); inAIsOfClassExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getClassName() != null ) { node.getClassName().apply(this); } if(node.getClassType() != null && !_visitedNodes.contains(node.getClassType())) { node.getClassType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outAIsOfClassExp(node); }
node.getClassType().apply(this, question);
node.getClassType().apply(this);
node.getClassType().apply(this);
/** * Called by the {@link AIsOfClassExp} node from {@link AIsOfClassExp#apply(IAnalysis)}. * @param node the calling {@link AIsOfClassExp} node */ public A caseAIsOfClassExp(AIsOfClassExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAIsOfClassExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getClassName() != null ) { mergeReturns(retVal,node.getClassName().apply(this)); } if(node.getClassType() != null && !_visitedNodes.contains(node.getClassType())) { mergeReturns(retVal,node.getClassType().apply(this)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this)); } mergeReturns(retVal,outAIsOfClassExp(node)); return retVal; }
/** * Called by the {@link AIsOfClassExp} node from {@link AIsOfClassExp#apply(IAnalysis)}. * @param node the calling {@link AIsOfClassExp} node */ public A caseAIsOfClassExp(AIsOfClassExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAIsOfClassExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getClassName() != null ) { mergeReturns(retVal,node.getClassName().apply(this, question)); } if(node.getClassType() != null && !_visitedNodes.contains(node.getClassType())) { mergeReturns(retVal,node.getClassType().apply(this, question)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this, question)); } mergeReturns(retVal,outAIsOfClassExp(node, question)); return retVal; }
mergeReturns(retVal,node.getClassType().apply(this));
mergeReturns(retVal,node.getClassType().apply(this, question));