Module net.sourceforge.argparse4j
Class StringArgumentType
java.lang.Object
net.sourceforge.argparse4j.impl.type.StringArgumentType
- All Implemented Interfaces:
ArgumentType<String>
Specialized to String type, just echos back given string.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(ArgumentParser parser, Argument arg, String value) Convertsvalueto appropriate type.
-
Constructor Details
-
StringArgumentType
public StringArgumentType()
-
-
Method Details
-
convert
Description copied from interface:ArgumentTypeConverts
valueto appropriate type.If the objects derived from
RuntimeExceptionare thrown in conversion because of invalid input from command line, subclass must catch these exceptions and wrap them inArgumentParserExceptionand give simple error message to explain what happened briefly.- Specified by:
convertin interfaceArgumentType<String>- Parameters:
parser- The parser.arg- The argument this type attached to.value- The attribute value.- Returns:
- Converted object.
-