Home » geronimo-2.2-source-release » org.apache.geronimo.cli » [javadoc | source]
org.apache.geronimo.cli
public class: PrintHelper [javadoc | source]
java.lang.Object
   org.apache.geronimo.cli.PrintHelper
This code is borrowed from commons-cli org.apache.commons.cli.HelpFormatter class. Its authors are Slawek Zachcial and John Keyes (john at integralsource.com). This class has been slightly updated to meet specific requirements.
Field Summary
public static final  int DEFAULT_WIDTH     
public static final  int DEFAULT_LEFT_PAD     
public static final  int DEFAULT_DESC_PAD     
public static final  String DEFAULT_SYNTAX_PREFIX     
public static final  String DEFAULT_OPT_PREFIX     
public static final  String DEFAULT_LONG_OPT_PREFIX     
public static final  String DEFAULT_ARG_NAME     
public  int defaultWidth     
public  int defaultLeftPad     
public  int defaultDescPad     
public  String defaultSyntaxPrefix     
public  String defaultNewLine     
public  String defaultOptPrefix     
public  String defaultLongOptPrefix     
public  String defaultArgName     
Constructor:
 public PrintHelper(OutputStream outputStream) 
Method from org.apache.geronimo.cli.PrintHelper Summary:
createPadding,   findWrapPos,   printHelp,   printHelp,   printHelp,   printOptions,   printOptions,   printOptionsNoDesc,   printUsage,   printUsage,   printWrapped,   printWrapped,   reformat,   renderOptions,   renderWrappedText,   rtrim
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.cli.PrintHelper Detail:
 protected String createPadding(int len) 
 protected int findWrapPos(String text,
    int width,
    int startPos) 
 public  void printHelp(String cmdLineSyntax,
    String header,
    Options options,
    String footer,
    boolean autoUsage) 
 public  void printHelp(int width,
    String cmdLineSyntax,
    String header,
    Options options,
    String footer,
    boolean autoUsage) 
 public  void printHelp(PrintWriter pw,
    int width,
    String cmdLineSyntax,
    String header,
    Options options,
    int leftPad,
    int descPad,
    String footer,
    boolean autoUsage) throws IllegalArgumentException 
 public  void printOptions(PrintWriter pw,
    Options options) 
 public  void printOptions(PrintWriter pw,
    int width,
    Options options,
    int leftPad,
    int descPad) 
 public  void printOptionsNoDesc(PrintWriter pw,
    Options options) 
 public  void printUsage(PrintWriter pw,
    int width,
    String cmdLineSyntax) 
 public  void printUsage(PrintWriter pw,
    int width,
    String app,
    Options options) 
 public  void printWrapped(PrintWriter pw,
    int width,
    String text) 
 public  void printWrapped(PrintWriter pw,
    int width,
    int nextLineTabStop,
    String text) 
 public static String reformat(String source,
    int indent,
    int width) 
 protected StringBuffer renderOptions(StringBuffer sb,
    int width,
    Options options,
    int leftPad,
    int descPad,
    boolean displayDesc) 
 protected StringBuffer renderWrappedText(StringBuffer sb,
    int width,
    int nextLineTabStop,
    String text) 
 protected String rtrim(String s)