Package picocli
Class CommandLine.BuiltIn.NetworkInterfaceConverter
java.lang.Object
picocli.CommandLine.BuiltIn.NetworkInterfaceConverter
- All Implemented Interfaces:
CommandLine.ITypeConverter<NetworkInterface>
- Enclosing class:
CommandLine.BuiltIn
static class CommandLine.BuiltIn.NetworkInterfaceConverter
extends Object
implements CommandLine.ITypeConverter<NetworkInterface>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts the specified command line argument value to some domain object.
-
Constructor Details
-
NetworkInterfaceConverter
NetworkInterfaceConverter()
-
-
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<NetworkInterface>
- 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')
-