org.kohsuke.args4j.spi

Class OptionHandler<T>

    • Field Detail

      • option

        public final OptionDef option
        The annotation.
      • setter

        public final Setter<? super T> setter
        Object to be used for setting value.
      • owner

        public final CmdLineParser owner
        The owner to which this handler belongs to.
    • Method Detail

      • parseArguments

        public abstract int parseArguments(Parameters params)                            throws CmdLineException
        Called if the option that this owner recognizes is found.
        Parameters:
        params - The rest of the arguments. This method can use this object to access the arguments of the option if necessary. The object is valid only during the method call.
        Returns:
        The number of arguments consumed. (For example, returns 0 if this option doesn't take any parameters.)
        Throws:
        CmdLineException
      • getDefaultMetaVariable

        public abstract String getDefaultMetaVariable()
        Gets the default meta variable name used to print the usage screen. The value returned by this method can be a reference in the ResourceBundle, if one was passed to CmdLineParser.
        Returns:
        null to hide a meta variable.
      • getNameAndMeta

        public final String getNameAndMeta(ResourceBundle rb)
        Get string representing usage for this option, of the form "name metaval", e.g. "-foo VALUE" or "--foo VALUE"
        Parameters:
        rb - ResourceBundle to get localized version of meta string
      • getNameAndMeta

        public final String getNameAndMeta(ResourceBundle rb,                    ParserProperties properties)
        Get string representing usage for this option, of the form "name metaval" or "name=metaval, e.g. "--foo VALUE" or "--foo=VALUE"
        Parameters:
        rb - ResourceBundle to get localized version of meta string
        properties - Affects the formatting behaviours.
      • print

        protected String print(T v)
        The opposite of the parse operation. This method is used to print the usage screen.
      • printDefaultValue

        public String printDefaultValue()
        Prints the default value by introspecting the current setter as Getter.
        Returns:
        null if the current value of the setter isn't available.

Copyright © 2003-2016 Kohsuke Kawaguchi. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14