# CommandLine.OverwrittenOptionException (picocli 3.9.6 API)
Date: 2019-04-06

picocli

## Class CommandLine.OverwrittenOptionException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - picocli.CommandLine.PicocliException
        - - picocli.CommandLine.ParameterException
          - - picocli.CommandLine.OverwrittenOptionException

All Implemented Interfaces:
  java.io.Serializable

Enclosing class:
  CommandLine

    public static class CommandLine.OverwrittenOptionException
    extends CommandLine.ParameterException

Exception indicating that an option for a single-value option field has been specified multiple times on the command line.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`OverwrittenOptionException(CommandLine commandLine, CommandLine.Model.ArgSpec overwritten, java.lang.String msg)`

### Method Summary

All Methods Instance Methods Concrete Methods
`CommandLine.Model.ArgSpec` `getOverwritten()` Returns the `CommandLine.Model.ArgSpec` for the option which was being overwritten.

### Methods inherited from class picocli.CommandLine.ParameterException

`getArgSpec, getCommandLine, getValue`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

### Constructor Detail

#### OverwrittenOptionException

    public OverwrittenOptionException(CommandLine commandLine,
                                      CommandLine.Model.ArgSpec overwritten,
                                      java.lang.String msg)

### Method Detail

#### getOverwritten

    public CommandLine.Model.ArgSpec getOverwritten()

Returns the `CommandLine.Model.ArgSpec` for the option which was being overwritten.

Since:
  3.8