rendered paste body public boolean find(JavaClass clazz) {
for (Method m : clazz.getMethods()) {
MethodGen methodGen = new MethodGen(m, className,
new ConstantPoolGen(clazz.getConstantPool()));
InstructionList il = methodGen.getInstructionList();
Iterator<InstructionHandle> ilit = il.iterator();
while (ilit.hasNext()) {
Instruction instruction = ilit.next().getInstruction();
if (instruction instanceof LDC) {
int idx = ((LDC) instruction).getIndex();
ConstantInteger constant = ((ConstantInteger) (clazz.getConstantPool().getConstant(idx)));
int value = constant.getBytes();
if(value == -65536)
return true;
}
}
}
return false;
}