Annotation Type InjectService


@Incubating @Target(METHOD) @Retention(RUNTIME) public @interface InjectService
Annotation allowing a service to request injection of other services.
Author:
Chris Cranford
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Specifies whether the service injection is required.
    The service that should be injected.
  • Element Details

    • service

      Class<?> service
      The service that should be injected. The default implementation is to use the argument type of the annotated method.
      Returns:
      the service class
      Default:
      java.lang.Void.class
    • required

      boolean required
      Specifies whether the service injection is required. The default implementation requires the service to be injected to avoid injection exceptions.
      Returns:
      true if the service is required, false if not.
      Default:
      true