Public Member Functions | |
JComment () | |
JComment (short style) | |
void | appendComment (String comment) |
void | print (JSourceWriter jsw) |
void | setComment (String comment) |
void | setStyle (short style) |
String | toString () |
Static Public Attributes | |
static final short | AUTO_STYLE = 0 |
static final short | BLOCK_STYLE = 1 |
static final short | LINE_STYLE = 2 |
static final short | HEADER_STYLE = 3 |
static final short | JAVADOC_STYLE = 4 |
Static Protected Attributes | |
static final int | MAX_LENGTH = 65 |
A class that represents a Java comment.
org.exolab.javasource.JComment.JComment | ( | ) |
Creates a new Java Comment
org.exolab.javasource.JComment.JComment | ( | short | style | ) |
Creates a new Java comment with the given style
void org.exolab.javasource.JComment.appendComment | ( | String | comment | ) |
Appends the comment String to this JDocComment
comment | the comment to append |
Referenced by org.exolab.javasource.JDocComment.print(), and org.exolab.castor.builder.SourceGenerator.SourceGenerator().
void org.exolab.javasource.JComment.print | ( | JSourceWriter | jsw | ) |
prints this JComment using the given JSourceWriter
jsw | the JSourceWriter to print to |
References org.exolab.javasource.JComment.AUTO_STYLE, org.exolab.javasource.JComment.BLOCK_STYLE, org.exolab.javasource.JSourceWriter.flush(), org.exolab.javasource.JSourceWriter.getIndentSize(), org.exolab.javasource.LineFormatter.hasMoreLines(), org.exolab.javasource.JComment.HEADER_STYLE, org.exolab.javasource.JComment.JAVADOC_STYLE, org.exolab.javasource.JComment.LINE_STYLE, org.exolab.javasource.JComment.MAX_LENGTH, org.exolab.javasource.LineFormatter.nextLine(), and org.exolab.javasource.JSourceWriter.writeln().
Referenced by org.exolab.javasource.JDocComment.print(), org.exolab.javasource.JCompUnit.print(), and org.exolab.javasource.JStructure.printHeader().
void org.exolab.javasource.JComment.setComment | ( | String | comment | ) |
Sets the comment String of this JDocComment
comment | the comment String of this JDocComment |
Referenced by org.exolab.javasource.JDocComment.print().
void org.exolab.javasource.JComment.setStyle | ( | short | style | ) |
String org.exolab.javasource.JComment.toString | ( | ) |
Returns the String representation of this Java Doc Comment
final short org.exolab.javasource.JComment.AUTO_STYLE = 0 [static] |
The auto style, allows this JComment to automatically choose a style for this comment
Referenced by org.exolab.javasource.JComment.print().
final short org.exolab.javasource.JComment.BLOCK_STYLE = 1 [static] |
The block comment style: \/* *\/
Referenced by org.exolab.javasource.JComment.print().
final short org.exolab.javasource.JComment.HEADER_STYLE = 3 [static] |
The header style, similiar to block, but with an '*' at the start of each line.
Referenced by org.exolab.javasource.JComment.print().
final short org.exolab.javasource.JComment.JAVADOC_STYLE = 4 [static] |
Similiar to HEADER_STYLE, but starts with: \/**
Referenced by org.exolab.javasource.JComment.print().
final short org.exolab.javasource.JComment.LINE_STYLE = 2 [static] |
The line comment style: \/\/
Referenced by org.exolab.javasource.JComment.print().
final int org.exolab.javasource.JComment.MAX_LENGTH = 65 [static, protected] |
The maximum number of characters per line
Referenced by org.exolab.javasource.JComment.print().