Package 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.- Version:
- $Revision: 6669 $ $Date: 2005-02-26 17:30:28 -0700 (Sat, 26 Feb 2005) $
- Author:
- Keith Visco
-
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendComment(java.lang.String comment)
Appends the comment String to this JDocComment.void
print(JSourceWriter jsw)
Prints this JComment using the given JSourceWriter.void
setComment(java.lang.String comment)
Sets the comment String of this JDocComment.void
setStyle(short style)
Sets the style for this JComment.java.lang.String
toString()
-
-
-
Field Detail
-
AUTO_STYLE
public static final short AUTO_STYLE
The auto style, allows this JComment to automatically choose a style for this comment.- See Also:
- Constant Field Values
-
BLOCK_STYLE
public static final short BLOCK_STYLE
The block comment style. \/* *\/- See Also:
- Constant Field Values
-
LINE_STYLE
public static final short LINE_STYLE
The line comment style. \/\/- See Also:
- Constant Field Values
-
HEADER_STYLE
public static final short HEADER_STYLE
The header style, similiar to block, but with an '*' at the start of each line.- See Also:
- Constant Field Values
-
JAVADOC_STYLE
public static final short JAVADOC_STYLE
Similiar to HEADER_STYLE. But starts with: \/**- See Also:
- Constant Field Values
-
MAX_LENGTH
protected static final int MAX_LENGTH
The maximum number of characters per line.- See Also:
- Constant Field Values
-
MAX_INDENT
protected static final int MAX_INDENT
The maximum number of characters to indent comments.- See Also:
- Constant Field Values
-
-
Method Detail
-
appendComment
public void appendComment(java.lang.String comment)
Appends the comment String to this JDocComment.- Parameters:
comment
- The comment to append.
-
setComment
public void setComment(java.lang.String comment)
Sets the comment String of this JDocComment.- Parameters:
comment
- The comment String of this JDocComment.
-
setStyle
public void setStyle(short style)
Sets the style for this JComment.- Parameters:
style
- The style to use for this JComment.
-
print
public void print(JSourceWriter jsw)
Prints this JComment using the given JSourceWriter.- Parameters:
jsw
- The JSourceWriter to print to.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-