ca.quine.jcommons.sourcegen
Class CommentSource
java.lang.Object
|
+--ca.quine.jcommons.sourcegen.CommentSource
- Direct Known Subclasses:
- JavaDocCommentSource
- public class CommentSource
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVADOC_STYLE
public static final String JAVADOC_STYLE
- See Also:
- Constant Field Values
INDENT_STYLE
public static final String INDENT_STYLE
- See Sun's JavaDoc page
regarding indent.
- See Also:
- Constant Field Values
C_STYLE
public static final String C_STYLE
- See Also:
- Constant Field Values
indentLevel
protected int indentLevel
style
protected String style
text
protected String text
CommentSource
public CommentSource(String style)
CommentSource
public CommentSource(int indentLevel,
String style)
isReformat
public boolean isReformat()
setReformat
public void setReformat(boolean reformat)
getIndentLevel
public int getIndentLevel()
setIndentLevel
public void setIndentLevel(int indentLevel)
getStyle
public String getStyle()
setStyle
public void setStyle(String style)
isStarOnEachLine
public boolean isStarOnEachLine()
setStarOnEachLine
public void setStarOnEachLine(boolean starOnEachLine)
getText
public String getText()
setText
public void setText(String text)
isUseSingleLineCommentIfPossible
public boolean isUseSingleLineCommentIfPossible()
setUseSingleLineCommentIfPossible
public void setUseSingleLineCommentIfPossible(boolean useSingleLineCommentIfPossible)
- If JavaDoc style is used, this field will be ignored.
output
public void output(FormattingRules rules,
StringBuffer buffer)
outputProtected
protected void outputProtected(FormattingRules rules,
StringBuffer buffer)
- Allow subclasses to take advantage of the text formatting without adding
the "style" to the beginning and end of the buffer. For example,
JavaDocCommentSource can then add block tags before the end of the
comment.
- Parameters:
rules
- buffer
-
outputWithoutReformat
protected void outputWithoutReformat(FormattingRules rules,
StringBuffer buffer)