picocli

## Class CommandLine.Model.UnmatchedArgsBinding

- java.lang.Object
- - picocli.CommandLine.Model.UnmatchedArgsBinding

- Enclosing class:
    CommandLine.Model

      public static class CommandLine.Model.UnmatchedArgsBinding
      extends Object

  This class allows applications to specify a custom binding that will be invoked for unmatched arguments. A binding can be created with a `ISetter` that consumes the unmatched arguments `String[]`, or with a `IGetter` that produces a `Collection<String>` that the unmatched arguments can be added to.
  Since:
    3.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CommandLine.Model.UnmatchedArgsBinding` | `forStringArrayConsumer(CommandLine.Model.ISetter setter)` Creates a `UnmatchedArgsBinding` for a setter that consumes `String[]` objects.
    `static CommandLine.Model.UnmatchedArgsBinding` | `forStringCollectionSupplier(CommandLine.Model.IGetter getter)` Creates a `UnmatchedArgsBinding` for a getter that produces a `Collection<String>` that the unmatched arguments can be added to.
    `CommandLine.Model.IGetter` | `getter()` Returns the getter responsible for producing a `Collection` that the unmatched arguments can be added to.
    `CommandLine.Model.ISetter` | `setter()` Returns the setter responsible for consuming the unmatched arguments.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### forStringArrayConsumer

          public static CommandLine.Model.UnmatchedArgsBinding forStringArrayConsumer(CommandLine.Model.ISetter setter)

      Creates a `UnmatchedArgsBinding` for a setter that consumes `String[]` objects.
      Parameters:
        `setter` - consumes the String[] array with unmatched arguments.

    - #### forStringCollectionSupplier

          public static CommandLine.Model.UnmatchedArgsBinding forStringCollectionSupplier(CommandLine.Model.IGetter getter)

      Creates a `UnmatchedArgsBinding` for a getter that produces a `Collection<String>` that the unmatched arguments can be added to.
      Parameters:
        `getter` - supplies a `Collection<String>` that the unmatched arguments can be added to.

    - #### getter

          public CommandLine.Model.IGetter getter()

      Returns the getter responsible for producing a `Collection` that the unmatched arguments can be added to.

    - #### setter

          public CommandLine.Model.ISetter setter()

      Returns the setter responsible for consuming the unmatched arguments.

Copyright © 2020. All rights reserved.