Annotation Type Parameter


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface Parameter
    An annotation for indicating a field is an input or output parameter. This annotation is a useful way for plugins to declare their inputs and outputs simply.
    Author:
    Johannes Schindelin, Grant Harris, Curtis Rueden
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Attr[] attrs
      A list of additional attributes which can be used to extend this annotation beyond its built-in capabilities.
      boolean autoFill
      Defines whether the parameter value should be filled programmatically, if possible.
      String callback
      Defines a function that is called whenever this parameter changes.
      String[] choices
      Defines the list of possible values (multiple choice text fields only).
      int columns
      Deprecated.
      Replaced by style().
      String description
      Defines a description for the parameter.
      String initializer
      Defines a function that is called to initialize the parameter.
      String label
      Defines a label for the parameter.
      String max
      Defines the maximum allowed value (numeric parameters only).
      String min
      Defines the minimum allowed value (numeric parameters only).
      boolean persist
      Defines whether to remember the most recent value of the parameter.
      String persistKey
      Defines a key to use for saving the value persistently.
      boolean required
      Defines whether the parameter value must be non-null.
      String stepSize
      Defines the step size to use (numeric parameters only).
      String style
      Defines the preferred widget style.
      ItemIO type
      Defines the input/output type of the parameter.
      String validater
      Defines a function that is called to validate the parameter value after it is marked as resolved.
      ItemVisibility visibility
      Defines the "visibility" of the parameter.
    • Element Detail

      • label

        String label
        Defines a label for the parameter.
        Default:
        ""
      • description

        String description
        Defines a description for the parameter.
        Default:
        ""
      • type

        ItemIO type
        Defines the input/output type of the parameter.

        Choices are:

        • INPUT: parameter is an input for the plugin.
        • OUTPUT: parameter is an output for the plugin.
        • BOTH: parameter is both and input and an output for the plugin. This type is used to indicate an object that is mutated somehow during execution.
        Default:
        org.scijava.ItemIO.INPUT
      • visibility

        ItemVisibility visibility
        Defines the "visibility" of the parameter.

        Choices are:

        • NORMAL: parameter is included in the history for purposes of data provenance, and included as a parameter when recording scripts.
        • TRANSIENT: parameter is excluded from the history for the purposes of data provenance, but still included as a parameter when recording scripts.
        • INVISIBLE: parameter is excluded from the history for the purposes of data provenance, and also excluded as a parameter when recording scripts. This option should only be used for parameters with no effect on the final output, such as a "verbose" flag.
        • MESSAGE: parameter value is intended as a message only, not editable by the user nor included as an input or output parameter.
        Default:
        org.scijava.ItemVisibility.NORMAL
      • autoFill

        boolean autoFill
        Defines whether the parameter value should be filled programmatically, if possible.
        Default:
        true
      • required

        boolean required
        Defines whether the parameter value must be non-null.
        Default:
        true
      • persist

        boolean persist
        Defines whether to remember the most recent value of the parameter.
        Default:
        true
      • persistKey

        String persistKey
        Defines a key to use for saving the value persistently.
        Default:
        ""
      • initializer

        String initializer
        Defines a function that is called to initialize the parameter.
        Default:
        ""
      • validater

        String validater
        Defines a function that is called to validate the parameter value after it is marked as resolved.
        See Also:
        Module.resolveInput(String)
        Default:
        ""
      • callback

        String callback
        Defines a function that is called whenever this parameter changes.

        This mechanism enables interdependent parameters of various types. For example, two int parameters "width" and "height" could update each other when another boolean "Preserve aspect ratio" flag is set.

        Default:
        ""
      • style

        String style
        Defines the preferred widget style.

        We do not use an enum because the styles need to be extensible. And we cannot use an interface-driven extensible enum pattern, because interfaces cannot be used as attributes within a Java annotation interface. So we fall back to strings!

        Default:
        ""
      • min

        String min
        Defines the minimum allowed value (numeric parameters only).
        Default:
        ""
      • max

        String max
        Defines the maximum allowed value (numeric parameters only).
        Default:
        ""
      • stepSize

        String stepSize
        Defines the step size to use (numeric parameters only).
        Default:
        ""
      • choices

        String[] choices
        Defines the list of possible values (multiple choice text fields only).
        Default:
        {}
      • attrs

        Attr[] attrs
        A list of additional attributes which can be used to extend this annotation beyond its built-in capabilities.
        Default:
        {}