org.acm.seguin.pretty
Class JavadocDescriptionPrinter

java.lang.Object
  extended by org.acm.seguin.pretty.JavadocDescriptionPrinter

public class JavadocDescriptionPrinter
extends java.lang.Object

Prints a description from a java doc comment with HTML tags formatted.

Author:
Chris Seguin, Mike Atkinson

Constructor Summary
JavadocDescriptionPrinter(PrintData data, java.lang.String description)
          Constructor for the JavadocDescriptionPrinter object
JavadocDescriptionPrinter(PrintData data, java.lang.String description, int initIndent)
          Constructor for the JavadocDescriptionPrinter object
 
Method Summary
protected  boolean endMode(net.sourceforge.jrefactory.parser.Token forToken)
          Detects the end of the tag marker
protected  void indent()
          Indents the line and inserts the required "*"
 void run()
          This is the main program.
static boolean spaceRequired(java.lang.String token)
          Certain tags require that we insert a space after them.
protected  boolean spaceRequired(net.sourceforge.jrefactory.parser.Token token)
          Certain tags require that we insert a space after them.
protected  boolean startMode(net.sourceforge.jrefactory.parser.Token forToken)
          Certain tags require that we insert a new line after them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavadocDescriptionPrinter

public JavadocDescriptionPrinter(PrintData data,
                                 java.lang.String description)
Constructor for the JavadocDescriptionPrinter object

Parameters:
data - Description of Parameter
description - Description of Parameter

JavadocDescriptionPrinter

public JavadocDescriptionPrinter(PrintData data,
                                 java.lang.String description,
                                 int initIndent)
Constructor for the JavadocDescriptionPrinter object

Parameters:
data - Description of Parameter
description - Description of Parameter
initIndent - Description of Parameter
Method Detail

run

public void run()
This is the main program.


indent

protected void indent()
Indents the line and inserts the required "*"


startMode

protected boolean startMode(net.sourceforge.jrefactory.parser.Token forToken)
Certain tags require that we insert a new line after them.

Parameters:
forToken - the tag that we are considering
Returns:
true if we just printed a space or a newline

spaceRequired

protected boolean spaceRequired(net.sourceforge.jrefactory.parser.Token token)
Certain tags require that we insert a space after them.

Parameters:
token - the tag that we are considering
Returns:
true if we just printed a space or a newline
Since:
JRefactory 2.7.00

endMode

protected boolean endMode(net.sourceforge.jrefactory.parser.Token forToken)
Detects the end of the tag marker

Parameters:
forToken - the token
Returns:
true if a newline has been issued.

spaceRequired

public static boolean spaceRequired(java.lang.String token)
Certain tags require that we insert a space after them.

Parameters:
token - the tag that we are considering (should be upper case).
Returns:
true if we just printed a space or a newline
Since:
JRefactory 2.9.17