mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
RootBeanDefinition publicly exposes target type as ResolvableType
Issue: SPR-17028
This commit is contained in:
+13
@@ -322,6 +322,19 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
|
||||
return (targetType != null ? targetType.resolve() : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a {@link ResolvableType} for this bean definition,
|
||||
* either from runtime-cached type information or from configuration-time
|
||||
* {@link #setTargetType(ResolvableType)} or {@link #setBeanClass(Class)}.
|
||||
* @since 5.1
|
||||
* @see #getTargetType()
|
||||
* @see #getBeanClass()
|
||||
*/
|
||||
public ResolvableType getResolvableType() {
|
||||
ResolvableType targetType = this.targetType;
|
||||
return (targetType != null ? targetType : ResolvableType.forClass(getBeanClass()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify a factory method name that refers to a non-overloaded method.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user