Module io.avaje.spi
Package io.avaje.spi

Annotation Type ServiceProvider


@Documented @Target(TYPE) @Retention(SOURCE) public @interface ServiceProvider
An annotation for service providers as described in ServiceLoader. The annotation processor generates the configuration files that allow the annotated class to be loaded with ServiceLoader.load(Class).

The annotated class must conform to the service provider specification. Specifically, it must:

  • be a non-inner, non-anonymous, concrete class
  • have a publicly accessible no-arg constructor
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The specific interface to generate a service registration.
  • Element Details

    • value

      Class<?>[] value
      The specific interface to generate a service registration.
      Returns:
      if none are defined the SPI interface will be inferred.
      Default:
      {}