spring-framework / org.springframework.beans.factory / ObjectProvider / getObject

getObject

abstract fun getObject(vararg args: Any): T

Return an instance (possibly shared or independent) of the object managed by this factory.

Allows for specifying explicit construction arguments, along the lines of BeanFactory#getBean(String, Object...).

Parameters

args - arguments to use when creating a corresponding instance

Exceptions

BeansException - in case of creation errors

Return
an instance of the bean

See Also
#getObject()