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