public T orElseCreate ( Class < ? extends T > type ) { Assert . notNull ( type , "Type must not be null" ) ; return ( this . value != null ) ? this . value : BeanUtils . instantiateClass ( type ) ; }
Return the object that was bound or a new instance of the specified class if no value has been bound .