use of org.apache.bcel.classfile.Unknown in project fb-contrib by mebigfatguy.
the class FunctionalInterfaceIssues method getMethodHandle.
private ConstantMethodHandle getMethodHandle(int bootstrapIndex) {
int offset = bootstrapIndex * 6;
byte[] attBytes = ((Unknown) bootstrapAtt).getBytes();
int methodRefIndex = CodeByteUtils.getshort(attBytes, offset += 2);
int numArgs = CodeByteUtils.getshort(attBytes, offset += 2);
for (int i = 0; i < numArgs; i++) {
int arg = CodeByteUtils.getshort(attBytes, offset += 2);
Constant c = getConstantPool().getConstant(arg);
if (c instanceof ConstantMethodHandle) {
return (ConstantMethodHandle) c;
}
}
return null;
}
Aggregations