Annotation Type Argument


  • @Target(METHOD)
    @Retention(RUNTIME)
    public @interface Argument
    Annotates a setter to be called with the value of a command line argument.
    Author:
    Clement Escoffier
    See Also:
    Option
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int index
      The (0-based) position of this argument relative to the argument list.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String argName
      The name of this argument (used in doc)
      boolean required
      Whether or not the argument is required.
    • Element Detail

      • index

        int index
        The (0-based) position of this argument relative to the argument list. The first parameter has the index 0, the second 1...

        Index is mandatory to force you to think to the order.

      • argName

        String argName
        The name of this argument (used in doc)
        Default:
        "value"
      • required

        boolean required
        Whether or not the argument is required. An argument is required by default.
        Default:
        true