Service Supplier
class ServiceSupplier<T : Any> @JvmOverloads constructor(val primaryType: KClass<T>, val name: String = defaultName(primaryType), val additionalTypes: Set<KClass<in T>> = emptySet(), val isPrimary: Boolean = false, val isLazy: Boolean = false, val priority: Int = 0, val annotations: List<Annotation> = emptyList(), val supplier: (BContext) -> T)(source)
Represents the attributes and initializer of a given service type.
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.
See also
Constructors
Link copied to clipboard
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)
Constructs a ServiceSupplier.
Properties
Link copied to clipboard
Additional types this service can be retrieved as
Link copied to clipboard
Annotations which should be tied to this service
Link copied to clipboard
Whether this service should be initialized only when requested
Link copied to clipboard
The type as which the service will be registered as