public static MethodHandle getMethodHandle(DynamicCallSite dcs) { MethodHandle mh = dcs.getBootstrapMethodHandle(); if (mh.getMethod().getDeclaringType().getInternalName().equals("java/lang/invoke/LambdaMetafactory")) { List<Object> args = dcs.getBootstrapArguments(); if (args.size() > 1 && args.get(1) instanceof MethodHandle) { MethodHandle actualHandle = (MethodHandle) args.get(1); return actualHandle; } } return null; }
public static MethodDefinition getLambdaMethod(Lambda l) { Object arg = l.getCallSite().getBootstrapArguments().get(1); if (arg instanceof MethodHandle) { MethodDefinition lm = ((MethodHandle) arg).getMethod().resolve(); if (lm != null) return lm; } throw new InternalError("Unable to determine original method for lambda " + l); }
return (IMethodSignature) callSite.getBootstrapArguments().get(2); return (IMethodSignature) callSite.getBootstrapArguments().get(2);
return (IMethodSignature) callSite.getBootstrapArguments().get(2); return (IMethodSignature) callSite.getBootstrapArguments().get(2);
return (IMethodSignature) callSite.getBootstrapArguments().get(2); return (IMethodSignature) callSite.getBootstrapArguments().get(2);
callSite.getBootstrapArguments().size() == 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetHandle.getMethod(); final Map<TypeReference, TypeReference> expectedMappings = new HashMap<>();
callSite.getBootstrapArguments().size() == 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetHandle.getMethod(); final Map<TypeReference, TypeReference> expectedMappings = new HashMap<>();
callSite.getBootstrapArguments().size() == 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetHandle.getMethod(); final Map<TypeReference, TypeReference> expectedMappings = new HashMap<>();
(StringUtilities.equals("metafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase) || StringUtilities.equals("altMetafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase)) && callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetMethodHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetMethodHandle.getMethod(); final MethodDefinition resolvedMethod = targetMethod.resolve();
callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(2) instanceof IMethodSignature) { final IMethodSignature signature = (IMethodSignature) callSite.getBootstrapArguments().get(2);
callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(2) instanceof IMethodSignature) { final IMethodSignature signature = (IMethodSignature) callSite.getBootstrapArguments().get(2);
(StringUtilities.equals("metafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase) || StringUtilities.equals("altMetafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase)) && callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetMethodHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetMethodHandle.getMethod(); final MethodDefinition resolvedMethod = targetMethod.resolve();
callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(2) instanceof IMethodSignature) { final IMethodSignature signature = (IMethodSignature) callSite.getBootstrapArguments().get(2);
(StringUtilities.equals("metafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase) || StringUtilities.equals("altMetafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase)) && callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetMethodHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetMethodHandle.getMethod(); final MethodDefinition resolvedMethod = targetMethod.resolve();
final MethodReference method = (MethodReference) callSite.getBootstrapArguments().get(0);
final MethodReference method = (MethodReference) callSite.getBootstrapArguments().get(0);
final MethodReference method = (MethodReference) callSite.getBootstrapArguments().get(0);
(StringUtilities.equals("metafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase) || StringUtilities.equals("altMetafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase)) && callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetMethodHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetMethodHandle.getMethod(); final TypeReference declaringType = targetMethod.getDeclaringType();
(StringUtilities.equals("metafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase) || StringUtilities.equals("altMetafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase)) && callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetMethodHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetMethodHandle.getMethod(); final TypeReference declaringType = targetMethod.getDeclaringType();
(StringUtilities.equals("metafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase) || StringUtilities.equals("altMetafactory", bootstrapMethod.getName(), StringComparison.OrdinalIgnoreCase)) && callSite.getBootstrapArguments().size() >= 3 && callSite.getBootstrapArguments().get(1) instanceof MethodHandle) { final MethodHandle targetMethodHandle = (MethodHandle) callSite.getBootstrapArguments().get(1); final MethodReference targetMethod = targetMethodHandle.getMethod(); final TypeReference declaringType = targetMethod.getDeclaringType();