Annotation Interface Plugin


@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface Plugin
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the name identifying this plugin in a human readable way.
    Returns the labels of the parameters for this plugin.
    Returns an Array of strings, such that each String is an initial label for a returned object.
    Class<?>[]
    Returns an Array of Class objects, such that each class object represents the type of the returned object at that index, i.e.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Categories define the 'type' of functionality the plugin provides.
    boolean
    Whether this plugin handles cancel itself.
    Returns the help / description for this plugin.
     
    Keywords / tags for the plugin (extra description)
    Indication of level for plug-in.
    int
    Returns the index + 1 in the result array of the most significant result for this plugin, i.e.
    Indication of quality for plug-in.
     
    boolean
    Signals the framework to make this plugin user-accessible.
  • Element Details

    • name

      String name
      Returns the name identifying this plugin in a human readable way.
      Returns:
    • returnLabels

      String[] returnLabels
      Returns an Array of strings, such that each String is an initial label for a returned object. Plugins can change this label during execution. The length of the array should be the same as the length of the returnTypes array.
      Returns:
    • returnTypes

      Class<?>[] returnTypes
      Returns an Array of Class objects, such that each class object represents the type of the returned object at that index, i.e. the plugin should return as many objects as the length of this array, and each object should be of the type given in this array.
      Returns:
    • parameterLabels

      String[] parameterLabels
      Returns the labels of the parameters for this plugin. If the Plugin annotation is used on a method, then the number of elements in this array should correspond to the number of parameters that the method requires, not counting the first parameter of type PluginContext. If the plugin annotation is used on a class, then each variant should indicate which subset of parameters it requires. Each parameter should appear in at least one variant. Note that the types of the parameters are not specified in the annotation. Instead they are derived from the method definitions that contain the logic of this plugin. Parameters can be overloaded, i.e. the same parameter can have multiple types.
      Returns:
    • help

      String help
      Returns the help / description for this plugin.
      Returns:
      Empty string as default
      Default:
      ""
    • userAccessible

      boolean userAccessible
      Signals the framework to make this plugin user-accessible. If a plugin is not user-accessible, it does not show up in any UI
      Returns:
      Defaults to true.
      Default:
      true
    • mostSignificantResult

      int mostSignificantResult
      Returns the index + 1 in the result array of the most significant result for this plugin, i.e. if the first element in the array is the most significant, then the value of this parameter should be 1. If the plugin does not return anything interesting itself, but considers one of it's inputs to be the most significant one, then a negative value should be returned. I.e. if the first parameter is the most significant result, a value of -1 has to be returned. Note that this parameter should always be included in all variants
      Returns:
      the index in the result array of the most significant result. If no results are returned by this plugin, anything can be returned. Defaults to 1
      Default:
      1
    • handlesCancel

      boolean handlesCancel
      Whether this plugin handles cancel itself. If this is true, the plug-in will not be killed but is allowed to terminate itself by monitoring isCancelled.
      Returns:
      Default:
      false
    • categories

      PluginCategory[] categories
      Categories define the 'type' of functionality the plugin provides.
      Default:
      {Analytics}
    • keywords

      String[] keywords
      Keywords / tags for the plugin (extra description)
      Default:
      {}
    • quality

      PluginQuality quality
      Indication of quality for plug-in.
      Returns:
      Default:
      VeryPoor
    • level

      Indication of level for plug-in.
      Returns:
      Default:
      NightlyBuild
    • icon

      String icon
      Default:
      ""
    • url

      String url
      Default:
      ""