mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 12:18:01 +08:00
fix code
This commit is contained in:
parent
548dcc6369
commit
1a82747d94
@ -125,6 +125,8 @@ public class LambdaFactory {
|
|||||||
final Class<?>[] paramTypes = funcMethod.getParameterTypes();
|
final Class<?>[] paramTypes = funcMethod.getParameterTypes();
|
||||||
// 函数对象将要实现的接口方法类型
|
// 函数对象将要实现的接口方法类型
|
||||||
final MethodType samMethodType = MethodType.methodType(funcMethod.getReturnType(), paramTypes);
|
final MethodType samMethodType = MethodType.methodType(funcMethod.getReturnType(), paramTypes);
|
||||||
|
// 一个直接方法句柄(DirectMethodHandle), 描述调用时将被执行的具体实现方法
|
||||||
|
final MethodHandle implMethodHandle = LookupUtil.unreflect(executable);
|
||||||
|
|
||||||
if (ClassUtil.isSerializable(funcType)) {
|
if (ClassUtil.isSerializable(funcType)) {
|
||||||
return LambdaMetafactory.altMetafactory(
|
return LambdaMetafactory.altMetafactory(
|
||||||
@ -132,7 +134,7 @@ public class LambdaFactory {
|
|||||||
invokeName,
|
invokeName,
|
||||||
invokedType,
|
invokedType,
|
||||||
samMethodType,
|
samMethodType,
|
||||||
LookupUtil.unreflect(executable),
|
implMethodHandle,
|
||||||
MethodTypeUtil.methodType(executable),
|
MethodTypeUtil.methodType(executable),
|
||||||
LambdaMetafactory.FLAG_SERIALIZABLE
|
LambdaMetafactory.FLAG_SERIALIZABLE
|
||||||
);
|
);
|
||||||
@ -143,7 +145,7 @@ public class LambdaFactory {
|
|||||||
invokeName,
|
invokeName,
|
||||||
invokedType,
|
invokedType,
|
||||||
samMethodType,
|
samMethodType,
|
||||||
LookupUtil.unreflect(executable),
|
implMethodHandle,
|
||||||
MethodTypeUtil.methodType(executable)
|
MethodTypeUtil.methodType(executable)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user