public class NetworkInterfaceNameConverter extends AbstractBaseConverter<NetworkInterface>
String into a NetworkInterface.
For a description of the format, see NetworkInterface.getByName(String).
Example:
@Parameter(names = { "--networkInterface" }, converter = NetworkInterfaceConverter.class)
private NetworkInterface networkInterface;
NetworkInterface,
NetworkInterface.getByName(String)failOnNull, targetClass| Constructor and Description |
|---|
NetworkInterfaceNameConverter(String optionName)
Constructs a converter.
|
| Modifier and Type | Method and Description |
|---|---|
protected NetworkInterface |
convertImpl(String value)
Converts a value.
|
convert, getErrorString, isSingle, newParameterException, newParameterException, split, toInt, toURIpublic NetworkInterfaceNameConverter(String optionName)
optionName - The option name, may be null.protected NetworkInterface convertImpl(String value) throws SocketException
AbstractBaseConverterconvertImpl in class AbstractBaseConverter<NetworkInterface>value - the value to convertSocketExceptionCopyright © 2016-2016 Gary Gregory. All Rights Reserved.
Use is subject to The Apache Software License, Version 2.0