All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.avaje.spi.Service Maven / Gradle / Ivy

There is a newer version: 2.6
Show newest version
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 {}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy