Allow a MethodReference to be produced from a GeneratedMethod
This commit updates GeneratedMethod and its underlying infrastructure to be able to produce a MethodReference. This simplifies the need when such a reference needs to be created manually and reuses more of what MethodReference has to offer. See gh-29005
This commit is contained in:
@@ -163,8 +163,8 @@ class ScopedProxyBeanRegistrationAotProcessor implements BeanRegistrationAotProc
|
||||
method.addStatement("return ($T) factory.getObject()",
|
||||
beanClass);
|
||||
});
|
||||
return CodeBlock.of("$T.of($T::$L)", InstanceSupplier.class,
|
||||
beanRegistrationCode.getClassName(), generatedMethod.getName());
|
||||
return CodeBlock.of("$T.of($L)", InstanceSupplier.class,
|
||||
generatedMethod.toMethodReference().toCodeBlock());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user