MethodGen gen = new MethodGen(m, c.getValue().getClassName(), cpg);
InstructionList il = gen.getInstructionList();
if (il == null) {
continue;
}
InstructionSearcher iS = new InstructionSearcher(il, cpg);
MethodSearcher mS = new MethodSearcher(m, cg, cpg);
RSField menuOpCount = data.getProperField("MenuOptionCount");
if (m.isStatic() && m.isFinal() && m.getReturnType().equals(Type.VOID) && mS.getArgCount() == 11 &&
mS.getTypeCount("int")>= 3 && mS.hasField(menuOpCount.path)) {
if(iS.nextFieldInstructionOf(menuOpCount.path)!=null){
FieldInstruction i = null;
i = (FieldInstruction)iS.prevGETSTATIC();
data.addField("MenuOpen", i.getClassName(cpg)+'.'+i.getFieldName(cpg));
iS.nextGETSTATIC();
}
if(iS.nextFieldInstructionOf(menuOpCount.path) != null){
FieldInstruction i = null;
i = (FieldInstruction)iS.prevGETSTATIC();
data.addField("MenuNodeList", i.getClassName(cpg)+'.'+i.getFieldName(cpg));
return SearchResult.Success;
}
}
}