use of com.android.tools.idea.experimental.codeanalysis.datastructs.graph.Graph in project android by JetBrains.
the class CFGBuilder method resolveParam.
/**
* Resolve the parameter at the current context.
* @param param The parameter
* @return The PsiCFG wrapper for the parameter
*/
@Nullable
private Param resolveParam(@NotNull PsiParameter param) {
Graph graph = this.mGraph;
if (graph instanceof BlockGraph) {
Param p = ((BlockGraph) graph).getParamFromPsiParameter(param);
if (p == null) {
if (graph instanceof MethodGraph) {
MethodGraph methodGraph = (MethodGraph) graph;
PsiCFGDebugUtil.LOG.warning("Parameter " + param.getName() + " does not exist in method " + methodGraph.getPsiCFGMethod().getName() + " in class " + this.containerClass.getQualifiedClassName());
} else {
PsiStatement psiStmt = ((BlockGraph) graph).getParentStmt();
PsiCFGDebugUtil.LOG.warning("Parameter " + param.getName() + " does not exist in context " + psiStmt.getText() + " in class " + this.containerClass.getQualifiedClassName());
}
}
return p;
}
PsiCFGDebugUtil.LOG.warning("Parameter " + param.getName() + " does not exist, the graph is not" + " a block graph");
return null;
}
Aggregations