io.avaje.spi.Service Maven / Gradle / Ivy
package io.avaje.spi;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.CLASS;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Marks a class/interface as service type (not an implementation).
*
* Use when the type is meant to be the default inferred type.
*
*
{@code
* @Service
* sealed class A permits B {
* ...
* }
*
* non-sealed class B extends A {
* ...
* }
*
* //the default inferred SPI is A instead of B
* @ServiceProvider
* class C extends B {
* ...
* }
*
* }
*/
@Target(TYPE)
@Retention(CLASS)
public @interface Service {}