Class JComment
- java.lang.Object
-
- org.codehaus.modello.plugin.java.javasource.JComment
-
public class JComment extends java.lang.ObjectA class that represents a Java comment.- Version:
- $Revision$ $Date$
- Author:
- Keith Visco
-
-
Field Summary
Fields Modifier and Type Field Description static shortAUTO_STYLEThe auto style, allows this JComment to automatically choose a style for this commentstatic shortBLOCK_STYLEThe block comment style: \/* *\/static shortHEADER_STYLEThe header style, similiar to block, but with an '*' at the start of each line.static shortJAVADOC_STYLESimiliar to HEADER_STYLE, but starts with: \/**static shortLINE_STYLEThe line comment style: \/\/protected static intMAX_LENGTHThe maximum number of characters per line
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendComment(java.lang.String comment)Appends the comment String to this JDocCommentvoidprint(JSourceWriter jsw)prints this JComment using the given JSourceWritervoidsetComment(java.lang.String comment)Sets the comment String of this JDocCommentvoidsetStyle(short style)Sets the style for this JCommentjava.lang.StringtoString()Returns the String representation of this Java Doc Comment
-
-
-
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
-
-
Method Detail
-
appendComment
public void appendComment(java.lang.String comment)
Appends the comment String to this JDocComment- Parameters:
comment- the comment to append
-
print
public void print(JSourceWriter jsw)
prints this JComment using the given JSourceWriter- Parameters:
jsw- the JSourceWriter to print to
-
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
-
toString
public java.lang.String toString()
Returns the String representation of this Java Doc Comment- Overrides:
toStringin classjava.lang.Object- Returns:
- the String representation of this Java Doc Comment
-
-