@Nullable abstract fun getIfAvailable(): T
Return an instance (possibly shared or independent) of the object managed by this factory.
BeansException - in case of creation errors
Return
an instance of the bean, or null if not available
See Also
#getObject()
open fun getIfAvailable(defaultSupplier: Supplier<T>): T
Return an instance (possibly shared or independent) of the object managed by this factory.
defaultSupplier - a callback for supplying a default object if none is present in the factory
BeansException - in case of creation errors
Return
an instance of the bean, or the supplied default object if no such bean is available
Since
5.0
See Also
#getIfAvailable()