public final class JComment extends Object
Modifier and Type | Field and Description |
---|---|
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_INDENT
The maximum number of characters to indent comments.
|
protected static int |
MAX_LENGTH
The maximum number of characters per line.
|
Constructor and Description |
---|
JComment()
Creates a new Java Comment.
|
JComment(short style)
Creates a new Java comment with the given style.
|
Modifier and Type | Method and Description |
---|---|
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() |
public static final short AUTO_STYLE
public static final short BLOCK_STYLE
public static final short LINE_STYLE
public static final short HEADER_STYLE
public static final short JAVADOC_STYLE
protected static final int MAX_LENGTH
protected static final int MAX_INDENT
public JComment()
public JComment(short style)
style
- The desired style.public void appendComment(String comment)
comment
- The comment to append.public void setComment(String comment)
comment
- The comment String of this JDocComment.public void setStyle(short style)
style
- The style to use for this JComment.public void print(JSourceWriter jsw)
jsw
- The JSourceWriter to print to.Copyright © 2014. All rights reserved.