org.crsh.cli.descriptor
Class Format

java.lang.Object
  extended by org.crsh.cli.descriptor.Format
Direct Known Subclasses:
Format.Describe, Format.Man, Format.Usage

public abstract class Format
extends Object

Format the command descriptor for producing documentation.

Author:
Julien Viet

Nested Class Summary
static class Format.Describe
          The command description in one line.
static class Format.Man
          The command manual.
static class Format.Usage
          The command usage.
 
Field Summary
static Format.Describe DESCRIBE
          .
static Format.Man MAN
          .
static Format.Usage USAGE
          .
 
Constructor Summary
Format()
           
 
Method Summary
abstract  void print(CommandDescriptor<?> command, Appendable stream)
          Print the specified command to the stream
protected  void printFQN(CommandDescriptor<?> command, Appendable stream)
          Print the full qualified name of the command.
protected  void printFQNWithOptions(CommandDescriptor<?> command, Appendable stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIBE

public static final Format.Describe DESCRIBE
.


USAGE

public static final Format.Usage USAGE
.


MAN

public static final Format.Man MAN
.

Constructor Detail

Format

public Format()
Method Detail

print

public abstract void print(CommandDescriptor<?> command,
                           Appendable stream)
                    throws IOException
Print the specified command to the stream

Parameters:
command - the command to print
stream - the output
Throws:
IOException

printFQN

protected void printFQN(CommandDescriptor<?> command,
                        Appendable stream)
                 throws IOException
Print the full qualified name of the command.

Parameters:
command - the command
stream - the output
Throws:
IOException - any io exception

printFQNWithOptions

protected void printFQNWithOptions(CommandDescriptor<?> command,
                                   Appendable stream)
                            throws IOException
Throws:
IOException


Copyright © 2015 eXo Platform SAS. All Rights Reserved.