/** * Return an array of interfaces that a singleton object exposed by this * FactoryBean is supposed to implement, for use with an 'early singleton * proxy' that will be exposed in case of a circular reference. * <p>The default implementation returns this FactoryBean's object type, * provided that it is an interface, or {@code null} otherwise. The latter * indicates that early singleton access is not supported by this FactoryBean. * This will lead to a FactoryBeanNotInitializedException getting thrown. * @return the interfaces to use for 'early singletons', * or {@code null} to indicate a FactoryBeanNotInitializedException * @see org.springframework.beans.factory.FactoryBeanNotInitializedException */ @Nullable protected Class<?>[] getEarlySingletonInterfaces() { Class<?> type = getObjectType(); return (type != null && type.isInterface() ? new Class<?>[] {type} : null); }
/** * Return an array of interfaces that a singleton object exposed by this * FactoryBean is supposed to implement, for use with an 'early singleton * proxy' that will be exposed in case of a circular reference. * <p>The default implementation returns this FactoryBean's object type, * provided that it is an interface, or {@code null} otherwise. The latter * indicates that early singleton access is not supported by this FactoryBean. * This will lead to a FactoryBeanNotInitializedException getting thrown. * @return the interfaces to use for 'early singletons', * or {@code null} to indicate a FactoryBeanNotInitializedException * @see org.springframework.beans.factory.FactoryBeanNotInitializedException */ @Nullable protected Class<?>[] getEarlySingletonInterfaces() { Class<?> type = getObjectType(); return (type != null && type.isInterface() ? new Class<?>[] {type} : null); }
/** * Return an array of interfaces that a singleton object exposed by this * FactoryBean is supposed to implement, for use with an 'early singleton * proxy' that will be exposed in case of a circular reference. * <p>The default implementation returns this FactoryBean's object type, * provided that it is an interface, or <code>null</code> else. The latter * indicates that early singleton access is not supported by this FactoryBean. * This will lead to a FactoryBeanNotInitializedException getting thrown. * @return the interfaces to use for 'early singletons', * or <code>null</code> to indicate a FactoryBeanNotInitializedException * @see org.springframework.beans.factory.FactoryBeanNotInitializedException */ protected Class[] getEarlySingletonInterfaces() { Class type = getObjectType(); return (type != null && type.isInterface() ? new Class[] {type} : null); }
/** * Return an array of interfaces that a singleton object exposed by this * FactoryBean is supposed to implement, for use with an 'early singleton * proxy' that will be exposed in case of a circular reference. * <p>The default implementation returns this FactoryBean's object type, * provided that it is an interface, or {@code null} otherwise. The latter * indicates that early singleton access is not supported by this FactoryBean. * This will lead to a FactoryBeanNotInitializedException getting thrown. * @return the interfaces to use for 'early singletons', * or {@code null} to indicate a FactoryBeanNotInitializedException * @see org.springframework.beans.factory.FactoryBeanNotInitializedException */ protected Class<?>[] getEarlySingletonInterfaces() { Class<?> type = getObjectType(); return (type != null && type.isInterface() ? new Class<?>[] {type} : null); }