Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.cli;
 
A basic CLI command.
 
public abstract class Command {
    private final String name;
    private final String description;

    
Create a new command with the given name and description.

Parameters:
name the name of the command, used for command line invocation
description a description of the command's purpose
    protected Command(String nameString description) {
        this. = name;
        this. = description;
    }

    
Returns the command's name.

Returns:
the command's name
    public final String getName() {
        return ;
    }

    
Returns the command's description.

Returns:
the command's description
    public final String getDescription() {
        return ;
    }

    
Configure the command's net.sourceforge.argparse4j.inf.Subparser.

Parameters:
subparser the net.sourceforge.argparse4j.inf.Subparser specific to the command
    public abstract void configure(Subparser subparser);

    
Executes when the user runs this specific command.

Parameters:
bootstrap the bootstrap bootstrap
namespace the parsed command line namespace
Throws:
java.lang.Exception if something goes wrong
    public abstract void run(Bootstrap<?> bootstrapNamespace namespacethrows Exception;
New to GrepCode? Check out our FAQ X