Service Supplier
constructor(primaryType: Class<T>, name: String = defaultName(primaryType.kotlin), additionalTypes: Set<Class<in T>> = emptySet(), isPrimary: Boolean = false, isLazy: Boolean = false, priority: Int = 0, annotations: List<Annotation> = emptyList(), supplier: (BContext) -> T)(source)
Constructs a ServiceSupplier.
Note: The annotations passed will not be readable using standard reflection, they are only read when functions like ServiceContainer.findAnnotationOnService or ServiceContainer.getServiceNamesForAnnotation are used.
Parameters
primary Type
The type as which the service will be registered as
name
The name to register the service as
additional Types
Additional types this service can be retrieved as
is Primary
Whether this service should be a primary service
is Lazy
Whether this service should be initialized only when requested
priority
The priority of this service
annotations
Annotations which should be tied to this service
supplier
The function supplying the service