Package org.jenkinsci.remoting
Class DurationOptionHandler
java.lang.Object
org.kohsuke.args4j.spi.OptionHandler<Duration>
org.jenkinsci.remoting.DurationOptionHandler
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class DurationOptionHandler
extends org.kohsuke.args4j.spi.OptionHandler<Duration>
Parses a string like 1s, 2m, 3h, 4d into a
Duration
.-
Field Summary
Fields inherited from class org.kohsuke.args4j.spi.OptionHandler
option, owner, setter
-
Constructor Summary
ConstructorDescriptionDurationOptionHandler
(org.kohsuke.args4j.CmdLineParser parser, org.kohsuke.args4j.OptionDef option, org.kohsuke.args4j.spi.Setter<? super Duration> setter) -
Method Summary
Modifier and TypeMethodDescriptionint
parseArguments
(org.kohsuke.args4j.spi.Parameters params) protected String
Methods inherited from class org.kohsuke.args4j.spi.OptionHandler
getMetaVariable, getNameAndMeta, getNameAndMeta, printDefaultValue
-
Constructor Details
-
DurationOptionHandler
public DurationOptionHandler(org.kohsuke.args4j.CmdLineParser parser, org.kohsuke.args4j.OptionDef option, org.kohsuke.args4j.spi.Setter<? super Duration> setter)
-
-
Method Details
-
parseArguments
public int parseArguments(org.kohsuke.args4j.spi.Parameters params) throws org.kohsuke.args4j.CmdLineException - Specified by:
parseArguments
in classorg.kohsuke.args4j.spi.OptionHandler<Duration>
- Throws:
org.kohsuke.args4j.CmdLineException
-
getDefaultMetaVariable
- Specified by:
getDefaultMetaVariable
in classorg.kohsuke.args4j.spi.OptionHandler<Duration>
-
print
- Overrides:
print
in classorg.kohsuke.args4j.spi.OptionHandler<Duration>
-