Annotation Interface ElementServiceExport
@Repeatable(ElementServiceExports.class)
@Target(TYPE)
@Retention(RUNTIME)
public @interface ElementServiceExport
Exports the target type making it available in the
ServiceLocator
methods. Specifically, this means that
when calling methods such as ServiceLocator.findInstance(Class)
, the type must bear this annotation or
it must be specified via ElementService.export()
annotation. Note, this does not specify an implementation
and should be specified separately using the ElementServiceImplementation
annotation.-
Optional Element Summary
Optional Elements
-
Element Details
-
value
Class<?>[] valueGets a list of all exposed which this service exposes in addition to the specified type. This can be useful if, for example, an interface implements multiple interfaces which should be exposed separately. If left empty, then only the annotated type (or type specified inElementService.value()
) will be exposed. If specified, this will expose only the types explicitly mentioned in the value.- Returns:
- the target type
- Default:
{}
-
name
String nameSpecifies the name of the service. If blank, the service will be unnamed.- Returns:
- the name of the service.
- Default:
""
-