Package org.kohsuke.args4j.spi
Class UuidOptionHandler
- java.lang.Object
-
- org.kohsuke.args4j.spi.OptionHandler<T>
-
- org.kohsuke.args4j.spi.OneArgumentOptionHandler<java.util.UUID>
-
- org.kohsuke.args4j.spi.UuidOptionHandler
-
public class UuidOptionHandler extends OneArgumentOptionHandler<java.util.UUID>
UUID
OptionHandler
.- Author:
- Tobias Stolzmann
- See Also:
UUID.fromString(String)
-
-
Field Summary
-
Fields inherited from class org.kohsuke.args4j.spi.OptionHandler
option, owner, setter
-
-
Constructor Summary
Constructors Constructor Description UuidOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super java.util.UUID> setter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultMetaVariable()
Gets the default meta variable name used to print the usage screen.protected java.util.UUID
parse(java.lang.String argument)
Parses a string to a real value of Type <T>.-
Methods inherited from class org.kohsuke.args4j.spi.OneArgumentOptionHandler
parseArguments
-
Methods inherited from class org.kohsuke.args4j.spi.OptionHandler
getMetaVariable, getNameAndMeta, getNameAndMeta, print, printDefaultValue
-
-
-
-
Constructor Detail
-
UuidOptionHandler
public UuidOptionHandler(CmdLineParser parser, OptionDef option, Setter<? super java.util.UUID> setter)
-
-
Method Detail
-
parse
protected java.util.UUID parse(java.lang.String argument) throws CmdLineException
Description copied from class:OneArgumentOptionHandler
Parses a string to a real value of Type <T>.- Specified by:
parse
in classOneArgumentOptionHandler<java.util.UUID>
- Parameters:
argument
- String value to parse- Returns:
- the parsed value
- Throws:
CmdLineException
- if the parsing encounters a failure that should be reported to the user.
-
getDefaultMetaVariable
public java.lang.String getDefaultMetaVariable()
Description copied from class:OptionHandler
Gets the default meta variable name used to print the usage screen. The value returned by this method can be a reference in theResourceBundle
, if one was passed toCmdLineParser
.- Overrides:
getDefaultMetaVariable
in classOneArgumentOptionHandler<java.util.UUID>
- Returns:
null
to hide a meta variable.
-
-