org.exolab.javasource
Class JComment
java.lang.Object
org.exolab.javasource.JComment
public final class JComment
extends java.lang.Object
A class that represents a Java comment.
$Revision: 6324 $ $Date: 2005-02-26 17:30:28 -0700 (Sat, 26 Feb 2005) $static short | AUTO_STYLE - The auto style, allows this JComment to automatically choose a style for
this comment.
|
static short | BLOCK_STYLE - The block comment style.
|
static short | HEADER_STYLE - The header style, similiar to block, but with an '*' at the start of each
line.
|
static short | JAVADOC_STYLE - Similiar to HEADER_STYLE.
|
static short | LINE_STYLE - The line comment style.
|
protected static int | MAX_LENGTH - The maximum number of characters per line.
|
JComment() - Creates a new Java Comment.
|
JComment(short style) - Creates a new Java comment with the given style.
|
void | appendComment(String comment) - Appends the comment String to this JDocComment.
|
void | print(JSourceWriter jsw) - Prints this JComment using the given JSourceWriter.
|
void | setComment(String comment) - Sets the comment String of this JDocComment.
|
void | setStyle(short style) - Sets the style for this JComment.
|
String | toString() - Returns the String representation of this Java Doc Comment.
|
AUTO_STYLE
public static final short AUTO_STYLE
The auto style, allows this JComment to automatically choose a style for
this comment.
BLOCK_STYLE
public static final short BLOCK_STYLE
The block comment style. \/* *\/
HEADER_STYLE
public static final short HEADER_STYLE
The header style, similiar to block, but with an '*' at the start of each
line.
JAVADOC_STYLE
public static final short JAVADOC_STYLE
Similiar to HEADER_STYLE. But starts with: \/**
LINE_STYLE
public static final short LINE_STYLE
The line comment style. \/\/
MAX_LENGTH
protected static final int MAX_LENGTH
The maximum number of characters per line.
JComment
public JComment()
Creates a new Java Comment.
JComment
public JComment(short style)
Creates a new Java comment with the given style.
style
- the desired style
appendComment
public void appendComment(String comment)
Appends the comment String to this JDocComment.
comment
- the comment to append
print
public void print(JSourceWriter jsw)
Prints this JComment using the given JSourceWriter.
jsw
- the JSourceWriter to print to
setComment
public void setComment(String comment)
Sets the comment String of this JDocComment.
comment
- the comment String of this JDocComment
setStyle
public void setStyle(short style)
Sets the style for this JComment.
style
- the style to use for this JComment
toString
public String toString()
Returns the String representation of this Java Doc Comment.
- the String representation of this Java Doc Comment.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com