Class SubcommandHandler

  • public class SubcommandHandler
    extends org.kohsuke.args4j.spi.OptionHandler<TextBuiltin>
    Custom Argument handler for jgit command selection.

    Translates a single argument string to a TextBuiltin instance which we can execute at runtime with the remaining arguments of the parser.

    • Constructor Detail

      • SubcommandHandler

        public SubcommandHandler​(org.kohsuke.args4j.CmdLineParser parser,
                                 org.kohsuke.args4j.OptionDef option,
                                 org.kohsuke.args4j.spi.Setter<? super TextBuiltin> setter)
        Create a new handler for the command name.

        This constructor is used only by args4j.

        parser - a CmdLineParser object.
        option - a OptionDef object.
        setter - a Setter object.
    • Method Detail

      • parseArguments

        public int parseArguments​(org.kohsuke.args4j.spi.Parameters params)
                           throws org.kohsuke.args4j.CmdLineException
        Specified by:
        parseArguments in class org.kohsuke.args4j.spi.OptionHandler<TextBuiltin>
      • getDefaultMetaVariable

        public String getDefaultMetaVariable()
        Specified by:
        getDefaultMetaVariable in class org.kohsuke.args4j.spi.OptionHandler<TextBuiltin>