Package org.kohsuke.args4j.spi
Class CharOptionHandler
- java.lang.Object
-
- org.kohsuke.args4j.spi.OptionHandler<T>
-
- org.kohsuke.args4j.spi.OneArgumentOptionHandler<java.lang.Character>
-
- org.kohsuke.args4j.spi.CharOptionHandler
-
public class CharOptionHandler extends OneArgumentOptionHandler<java.lang.Character>
- Since:
- 2.0.9
- Author:
- Jan Materne
-
-
Field Summary
-
Fields inherited from class org.kohsuke.args4j.spi.OptionHandler
option, owner, setter
-
-
Constructor Summary
Constructors Constructor Description CharOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super java.lang.Character> setter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Character
parse(java.lang.String argument)
Parses a string to a real value of Type <T>.-
Methods inherited from class org.kohsuke.args4j.spi.OneArgumentOptionHandler
getDefaultMetaVariable, parseArguments
-
Methods inherited from class org.kohsuke.args4j.spi.OptionHandler
getMetaVariable, getNameAndMeta, getNameAndMeta, print, printDefaultValue
-
-
-
-
Constructor Detail
-
CharOptionHandler
public CharOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super java.lang.Character> setter)
-
-
Method Detail
-
parse
protected java.lang.Character parse(java.lang.String argument) throws java.lang.NumberFormatException, CmdLineException
Description copied from class:OneArgumentOptionHandler
Parses a string to a real value of Type <T>.- Specified by:
parse
in classOneArgumentOptionHandler<java.lang.Character>
- Parameters:
argument
- String value to parse- Returns:
- the parsed value
- Throws:
java.lang.NumberFormatException
- if parsing is not possibleCmdLineException
- if the parsing encounters a failure that should be reported to the user.
-
-