- java.lang.Object
-
- com.github.rvesse.airline.help.Help<T>
-
- All Implemented Interfaces:
java.lang.Runnable
,java.util.concurrent.Callable<java.lang.Void>
- Direct Known Subclasses:
CustomHelp
@Command(name="help", description="Display help information") public class Help<T> extends java.lang.Object implements java.lang.Runnable, java.util.concurrent.Callable<java.lang.Void>
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<java.lang.String>
command
GlobalMetadata<T>
global
boolean
includeHidden
-
Constructor Summary
Constructors Constructor Description Help()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Void
call()
static void
help(CommandMetadata command)
Displays plain text format help for the given command to standard outstatic void
help(CommandMetadata command, boolean includeHidden)
Displays plain text format help for the given command to standard outstatic void
help(CommandMetadata command, boolean includeHidden, java.io.OutputStream out)
Displays plain text format help or the given command to the given output streamstatic void
help(CommandMetadata command, java.io.OutputStream out)
Displays plain text format help or the given command to the given output streamstatic <T> void
help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames)
Displays plain text format program help to standard outstatic <T> void
help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames, boolean includeHidden)
Displays plain text format program help to standard outstatic <T> void
help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames, boolean includeHidden, java.io.OutputStream out)
Displays plain text format program help to the given output streamstatic <T> void
help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames, java.io.OutputStream out)
Displays plain text format program help to the given output streamvoid
run()
-
-
-
Field Detail
-
global
@AirlineModule public GlobalMetadata<T> global
-
command
@Arguments public java.util.List<java.lang.String> command
-
includeHidden
@Option(name="--include-hidden", description="When set the help output will include hidden commands and options", hidden=true) public boolean includeHidden
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
call
public java.lang.Void call()
- Specified by:
call
in interfacejava.util.concurrent.Callable<T>
-
help
public static void help(CommandMetadata command) throws java.io.IOException
Displays plain text format help for the given command to standard out- Parameters:
command
- Command- Throws:
java.io.IOException
-
help
public static void help(CommandMetadata command, boolean includeHidden) throws java.io.IOException
Displays plain text format help for the given command to standard out- Parameters:
command
- Command- Throws:
java.io.IOException
-
help
public static void help(CommandMetadata command, java.io.OutputStream out) throws java.io.IOException
Displays plain text format help or the given command to the given output stream- Parameters:
command
- Commandout
- Output stream- Throws:
java.io.IOException
-
help
public static void help(CommandMetadata command, boolean includeHidden, java.io.OutputStream out) throws java.io.IOException
Displays plain text format help or the given command to the given output stream- Parameters:
command
- Commandout
- Output stream- Throws:
java.io.IOException
-
help
public static <T> void help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames) throws java.io.IOException
Displays plain text format program help to standard out- Parameters:
global
- Program metadatacommandNames
- Command Names- Throws:
java.io.IOException
-
help
public static <T> void help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames, boolean includeHidden) throws java.io.IOException
Displays plain text format program help to standard out- Parameters:
global
- Program metadatacommandNames
- Command NamesincludeHidden
- Whether to include hidden commands and options in the output- Throws:
java.io.IOException
-
help
public static <T> void help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames, java.io.OutputStream out) throws java.io.IOException
Displays plain text format program help to the given output stream- Parameters:
global
- Program meta-datacommandNames
- Command Namesout
- Output Stream- Throws:
java.io.IOException
-
help
public static <T> void help(GlobalMetadata<T> global, java.util.List<java.lang.String> commandNames, boolean includeHidden, java.io.OutputStream out) throws java.io.IOException
Displays plain text format program help to the given output stream- Parameters:
global
- Program meta-datacommandNames
- Command Namesout
- Output Stream- Throws:
java.io.IOException
-
-