Package io.hekate.core.service
Annotation Type DefaultServiceFactory
-
@Documented @Target(TYPE) @Retention(RUNTIME) public @interface DefaultServiceFactory
Specifies the default factory for aService
interface.This annotation can be placed on a
Service
interface in order to specify which factory should be used to construct a new service instance by default.Default instantiation takes place when some service
A
depends
on some other serviceB
and there is no factory for serviceB
beingregistered
. In such case the presence of this annotation will be checked on the serviceB
's interface and if it exists then service will be constructed via the annotated factory.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends ServiceFactory<?>>
value
Service factory class.
-
-
-
Element Detail
-
value
Class<? extends ServiceFactory<?>> value
Service factory class. Must be instantiable via reflections (i.e. must have a default no-arg public constructor).- Returns:
- Service factory class.
-
-