MCPcopy Create free account
hub / github.com/FabricMC/Matcher / getTargetHandle

Method getTargetHandle

src/main/java/matcher/Util.java:212–223  ·  view source on GitHub ↗
(Handle bsm, Object[] bsmArgs)

Source from the content-addressed store, hash-verified

210 1, 21, 8 };
211
212 public static Handle getTargetHandle(Handle bsm, Object[] bsmArgs) {
213 if (isJavaLambdaMetafactory(bsm)) {
214 return (Handle) bsmArgs[1];
215 } else if (isIrrelevantBsm(bsm)) {
216 return null;
217 } else {
218 Matcher.LOGGER.warn("Unknown invokedynamic bsm: {}/{}{} (tag={} iif={})",
219 bsm.getOwner(), bsm.getName(), bsm.getDesc(), bsm.getTag(), bsm.isInterface());
220
221 return null;
222 }
223 }
224
225 public static boolean isJavaLambdaMetafactory(Handle bsm) {
226 return bsm.getTag() == Opcodes.H_INVOKESTATIC

Callers 4

isSameMethodMethod · 0.95
processMethodInsnsMethod · 0.95
isLambdaMethodMethod · 0.95

Calls 6

isIrrelevantBsmMethod · 0.95
isInterfaceMethod · 0.80
getOwnerMethod · 0.65
getNameMethod · 0.65
getDescMethod · 0.45

Tested by

no test coverage detected