boolean classNamesMatch = ri.getClassName().equals(className);
if (classNamesMatch) {
String instructionLine = instruction.getMnemonic() + " "
+ instruction.getParameters().getString(sc.getDc());
Link link = new Link();
link.setText("Field Ref : " + sc.getCf().getFullClassName() + "." + sc.getMethod().getName() + " / " + instructionLine);
link.setAnchor(Link.ANCHOR_METHOD_CODE);
link.setProject(sc.getProject());
link.setFile(sc.getFilename());
link.setTab(Tab.EDITOR);
link.setMethod(sc.getMethod());
link.setPosition(sc.getDc().getPosition());
MainWindow.getInstance().getSearchTab().addResult(link);
this.resultCount++;
}
} else if (params.getType(i) == ParameterType.TYPE_CONSTANT_POOL_METHOD_REF) {
ConstantPoolInfo cpi = sc.getDc().getConstantPool().get(
params.getInt(i));
RefInfo ri = (RefInfo) cpi;
boolean classNamesMatch = ri.getClassName().equals(className);
if (classNamesMatch) {
String instructionLine = instruction.getMnemonic() + " "
+ instruction.getParameters().getString(sc.getDc());
Link link = new Link();
link.setText("Method Call : " + sc.getCf().getFullClassName() + "." + sc.getMethod().getName() + " / " + instructionLine);
link.setAnchor(Link.ANCHOR_METHOD_CODE);
link.setProject(sc.getProject());
link.setFile(sc.getFilename());
link.setTab(Tab.EDITOR);
link.setMethod(sc.getMethod());
link.setPosition(sc.getDc().getPosition());
MainWindow.getInstance().getSearchTab().addResult(link);
this.resultCount++;
}
} else if (params.getType(i) == ParameterType.TYPE_CONSTANT_POOL_CLASS) {
ConstantPoolInfo cpi = sc.getDc().getConstantPool().get(
params.getInt(i));
ClassInfo ci = (ClassInfo) cpi;
boolean classNamesMatch = ci.getName().equals(className);
if (classNamesMatch) {
String instructionLine = instruction.getMnemonic() + " "
+ instruction.getParameters().getString(sc.getDc());
Link link = new Link();
link.setText("Instruction : " + sc.getCf().getFullClassName() + "." + sc.getMethod().getName() + " / " + instructionLine);
link.setAnchor(Link.ANCHOR_METHOD_CODE);
link.setProject(sc.getProject());
link.setFile(sc.getFilename());
link.setTab(Tab.EDITOR);
link.setMethod(sc.getMethod());
link.setPosition(sc.getDc().getPosition());
MainWindow.getInstance().getSearchTab().addResult(link);
this.resultCount++;
}
}