Package com.sun.tools.corba.ee.idl
Class Comment
- java.lang.Object
-
- com.sun.tools.corba.ee.idl.Comment
-
public class Comment extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate(java.lang.String indent, java.io.PrintWriter printStream)
Writes comment text to the specified print stream in the appropriate format.private void
print(java.lang.String indent, java.io.PrintWriter stream)
Writes comment to the specified print stream without altering its format.private void
printCBlock(java.lang.String indent, java.io.PrintWriter stream)
Writes comment in c-block-style to the specified print stream.private void
printCppLine(java.lang.String indent, java.io.PrintWriter stream)
Writes a line comment to the specified print stream.private void
printJavaDoc(java.lang.String indent, java.io.PrintWriter stream)
Writes comment in JavaDoc-style to the specified print stream.private int
style(java.lang.String text)
Returns the comment style of a string.java.lang.String
text()
Returns comment textvoid
text(java.lang.String string)
Sets comment textvoid
write()
Writes comment text to standard output (debug).
-
-
-
Field Detail
-
UNKNOWN
static final int UNKNOWN
- See Also:
- Constant Field Values
-
JAVA_DOC
static final int JAVA_DOC
- See Also:
- Constant Field Values
-
C_BLOCK
static final int C_BLOCK
- See Also:
- Constant Field Values
-
CPP_LINE
static final int CPP_LINE
- See Also:
- Constant Field Values
-
_eol
private static java.lang.String _eol
-
_text
private java.lang.String _text
-
_style
private int _style
-
-
Method Detail
-
text
public void text(java.lang.String string)
Sets comment text
-
text
public java.lang.String text()
Returns comment text- Returns:
- comment text
-
style
private int style(java.lang.String text)
Returns the comment style of a string.- Parameters:
text
- text to check the style of- Returns:
- -1 =Unknown, 0 = Javadoc, 1 = Comment block, 2= Comment Line
-
write
public void write()
Writes comment text to standard output (debug).
-
generate
public void generate(java.lang.String indent, java.io.PrintWriter printStream)
Writes comment text to the specified print stream in the appropriate format.- Parameters:
indent
- string to print at the start of each line.null
is equivalent to an empty string.printStream
- stream to write text to
-
print
private void print(java.lang.String indent, java.io.PrintWriter stream)
Writes comment to the specified print stream without altering its format. This routine does not alter vertical or horizontal spacing of comment text, thus, it only works well for comments with a non-indented first line.
-
printJavaDoc
private void printJavaDoc(java.lang.String indent, java.io.PrintWriter stream)
Writes comment in JavaDoc-style to the specified print stream.
-
printCBlock
private void printCBlock(java.lang.String indent, java.io.PrintWriter stream)
Writes comment in c-block-style to the specified print stream.
-
printCppLine
private void printCppLine(java.lang.String indent, java.io.PrintWriter stream)
Writes a line comment to the specified print stream.
-
-