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