use of jadx.plugins.input.java.data.attributes.types.data.RawBootstrapMethod in project jadx by skylot.
the class ConstPoolReader method resolveMethodCallSite.
private CallSite resolveMethodCallSite(int bootstrapMthIdx, int nameIdx, int descIdx) {
JavaBootstrapMethodsAttr bootstrapMethodsAttr = clsData.loadAttribute(data, JavaAttrType.BOOTSTRAP_METHODS);
if (bootstrapMethodsAttr == null) {
throw new JavaClassParseException("Unexpected missing BootstrapMethods attribute");
}
RawBootstrapMethod rawBootstrapMethod = bootstrapMethodsAttr.getList().get(bootstrapMthIdx);
List<EncodedValue> values = new ArrayList<>(6);
values.add(new EncodedValue(EncodedType.ENCODED_METHOD_HANDLE, getMethodHandle(rawBootstrapMethod.getMethodHandleIdx())));
values.add(new EncodedValue(EncodedType.ENCODED_STRING, getUtf8(nameIdx)));
values.add(new EncodedValue(EncodedType.ENCODED_METHOD_TYPE, DescriptorParser.parseToMethodProto(getUtf8(descIdx))));
for (int argConstIdx : rawBootstrapMethod.getArgs()) {
values.add(readAsEncodedValue(argConstIdx));
}
return new CallSite(values);
}
Aggregations