Package org.jacoco.cli.internal
Class Command
- java.lang.Object
-
- org.jacoco.cli.internal.Command
-
-
Constructor Summary
Constructors Constructor Description Command()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
description()
abstract int
execute(java.io.PrintWriter out, java.io.PrintWriter err)
Executes the given command.java.lang.String
name()
protected void
printHelp(java.io.PrintWriter writer)
Prints textual help for this command.java.lang.String
usage(CommandParser parser)
-
-
-
Field Detail
-
JAVACMD
public static final java.lang.String JAVACMD
Common command line prefix.- See Also:
- Constant Field Values
-
help
public boolean help
Flag whether help should be printed for this command.
-
quiet
public boolean quiet
Flag whether output to stdout should be suppressed.
-
-
Method Detail
-
description
public abstract java.lang.String description()
- Returns:
- Short description of the command.
-
name
public java.lang.String name()
- Returns:
- name of the command
-
usage
public java.lang.String usage(CommandParser parser)
- Parameters:
parser
- parser for this command- Returns:
- usage string displayed for help
-
execute
public abstract int execute(java.io.PrintWriter out, java.io.PrintWriter err) throws java.lang.Exception
Executes the given command.- Parameters:
out
- std outerr
- std err- Returns:
- exit code, should be 0 for normal operation
- Throws:
java.lang.Exception
- any exception that my occur during execution
-
printHelp
protected void printHelp(java.io.PrintWriter writer)
Prints textual help for this command.- Parameters:
writer
- output destination
-
-