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