Annotation Type ServiceInfo


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface ServiceInfo
    Meta-data about a Plugin's Service.

    Example:

    @ServiceInfo( defaultProvider = MyPlugin.class )
     public interface MyService {
      public void foo();
    }
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<? extends Plugin>[] defaultProvider
      Sets the class that provides the default implementation of this service.
      java.lang.String defaultProviderName
      Sets the class name of the class that provides the default implementation of this service.
      java.lang.String description
      Sets the description for this service.
    • Element Detail

      • defaultProviderName

        java.lang.String defaultProviderName
        Sets the class name of the class that provides the default implementation of this service.

        Use this form instead of defaultProvider = Someclass.class if you want to prevent any form of reference between the service class and the implementation class.

        For example, defaultProviderName = "packageX.subPackageY.SomeClass"

        Using defaultProviderName = packageX.subPackageY.SomeClass.class.getName() will not work (value needs to be a constant expression).

        Returns:
        full package and classname string of the plugin class that provides this service.
        Default:
        ""
      • defaultProvider

        java.lang.Class<? extends Plugin>[] defaultProvider
        Sets the class that provides the default implementation of this service.

        Returns:
        Class instance of the plugin that provides this service.
        Default:
        {}
      • description

        java.lang.String description
        Sets the description for this service.

        Currently not used.

        Returns:
        string description of this service.
        Default:
        ""