Annotation Interface Service
@Documented
@Retention(RUNTIME)
@Target(TYPE)
@Analyze("org.tentackle.buildsupport.ServiceAnalyzeHandler")
public @interface Service
Annotation to express that the annotated class is a service implementation.
Processed at build time by the ServiceAnalyzeHandler of the tentackle-maven-plugin's analyze goal,
which appends the annotated class to META-INF/services/<serviced class>.
The annotation can also be used as a meta-annotation, i.e., to annotate another annotation
(see AnnotationProcessor for an example).
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDetermines whether the servicing class is the annotated class or the value of the annotated annotation.
Notice the difference between the serviced and servicing class!
-
Element Details
-
value
-
method
String methodThe name of the element that provides the value, if this annotation is used as a meta-annotation.
Ifmeta()is false, the element of the annotated annotation provides the serviced class (only ifvalue()is not given explicitly). Ifmeta()is true, it provides the servicing class. The default is "value".- Returns:
- the element name
- Default:
"value"
-
meta
boolean metaDetermines whether the servicing class is the annotated class or the value of the annotated annotation.
Notice the difference between the serviced and servicing class!Meta services go to META-INF/meta-services instead of META-INF/services because the provider usually resides in another module.
- Returns:
- true if this is a meta annotation and the servicing class is provided by the annotated annotation
- Default:
false
-