registerInstanceSupplier

Deprecated

For removal, replaced by registerServiceSupplier

Registers a supplier lazily returning an instance of the specified class, the instance is then made available via dependency injection.

The class it is registered as (T) is searched for the usual annotations such as @Primary, @InterfacedService and @Lazy.

Note: The class still needs to be in the search path, either using BConfigBuilder.addSearchPath or BConfigBuilder.addClass.

Parameters

T

The primary type as which the service is registered as, other types may be registered with the usual annotations

instanceSupplier

Supplier for the service instance, ran at startup, unless T is annotated with @Lazy