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

Method isJavaLambdaMetafactory

src/main/java/matcher/Util.java:225–233  ·  view source on GitHub ↗
(Handle bsm)

Source from the content-addressed store, hash-verified

223 }
224
225 public static boolean isJavaLambdaMetafactory(Handle bsm) {
226 return bsm.getTag() == Opcodes.H_INVOKESTATIC
227 && bsm.getOwner().equals("java/lang/invoke/LambdaMetafactory")
228 && (bsm.getName().equals("metafactory")
229 && bsm.getDesc().equals("(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;")
230 || bsm.getName().equals("altMetafactory")
231 && bsm.getDesc().equals("(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;"))
232 && !bsm.isInterface();
233 }
234
235 public static boolean isIrrelevantBsm(Handle bsm) {
236 String owner = bsm.getOwner();

Callers 3

getTargetHandleMethod · 0.95
compareInsnsMethod · 0.95
isLambdaMethodMethod · 0.95

Calls 5

isInterfaceMethod · 0.80
getOwnerMethod · 0.65
getNameMethod · 0.65
equalsMethod · 0.45
getDescMethod · 0.45

Tested by

no test coverage detected