Package nbbrd.service
Annotation Type ServiceProvider
-
@Documented @Target(TYPE) @Retention(SOURCE) @Repeatable(List.class) public @interface ServiceProvider
Declarative registration of a service provider.Current features:
- generates classpath files in
META-INF/servicesfolder - supports multiple registration of one class
- can infer the service if the provider implements/extends exactly one interface/class
- checks coherence between classpath and modulepath if
module-info.javais available
Current limitations:
- detects modulepath
public static provider()method but doesn't generate a workaround for classpath
- Author:
- Philippe Charles
- generates classpath files in
-
-
Element Detail
-
value
Class<?> value
The interface (or class) to register this implementation under.
This value is optional if the provider implements/extends exactly one interface/class.- Returns:
- a non-null type
- Default:
- java.lang.Void.class
-
-