注释类型 AutoService


  • @Documented
    @Retention(SOURCE)
    @Target(TYPE)
    public @interface AutoService
    An annotation for service providers as described in ServiceLoader. The AutoServiceProcessor generates the configuration files which allows service providers to be loaded with ServiceLoader.load(Class).

    Service providers assert that they conform to the service provider specification. Specifically, they must:

    • be a non-inner, non-anonymous, concrete class
    • have a publicly accessible no-arg constructor
    • implement the interface type returned by value()
    作者:
    google
    • 必需元素概要

      所需元素 
      修饰符和类型 必需的元素 说明
      Class<?>[] value
      Returns the interfaces implemented by this service provider.
    • 元素详细资料

      • value

        Class<?>[] value
        Returns the interfaces implemented by this service provider.
        返回:
        interface array