Package picocli
Class CommandLine.BuiltIn.CurrencyConverter
java.lang.Object
picocli.CommandLine.BuiltIn.CurrencyConverter
- All Implemented Interfaces:
CommandLine.ITypeConverter<Currency>
- Enclosing class:
CommandLine.BuiltIn
static class CommandLine.BuiltIn.CurrencyConverter
extends Object
implements CommandLine.ITypeConverter<Currency>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CurrencyConverter
CurrencyConverter()
-
-
Method Details
-
convert
Description copied from interface:CommandLine.ITypeConverter
Converts the specified command line argument value to some domain object.- Specified by:
convert
in interfaceCommandLine.ITypeConverter<Currency>
- Parameters:
s
- the command line argument String value- Returns:
- the resulting domain object
- Throws:
Exception
- an exception detailing what went wrong during the conversion. Any exception thrown from this method will be caught and shown to the end user. An example error message shown to the end user could look something like this:Invalid value for option '--some-option': cannot convert 'xxxinvalidinput' to SomeType (java.lang.IllegalArgumentException: Invalid format: must be 'x:y:z' but was 'xxxinvalidinput')
-