Class LineFormatter
- java.lang.Object
-
- org.codehaus.modello.plugin.java.javasource.LineFormatter
-
class LineFormatter extends java.lang.Object
Formats a given String for use within a Java comment
-
-
Constructor Summary
Constructors Constructor Description LineFormatter(java.lang.String comment)
Creates a LineFormatter for the given commentLineFormatter(java.lang.String comment, int maxLength)
Creates a new LineFormatter for the given commentLineFormatter(java.lang.String comment, int maxLength, java.lang.String prefix)
Creates a new LineFormatter for the given comment
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
hasMoreLines()
private boolean
isBreakable(char ch)
private boolean
isNewLine(char ch)
private boolean
isWhitespace(char ch)
(package private) java.lang.String
nextLine()
(package private) void
setPrefix(java.lang.String prefix)
Sets the prefix that should be appended to the beginning of each line
-
-
-
Constructor Detail
-
LineFormatter
LineFormatter(java.lang.String comment)
Creates a LineFormatter for the given comment- Parameters:
comment
- the String to format
-
LineFormatter
LineFormatter(java.lang.String comment, int maxLength)
Creates a new LineFormatter for the given comment- Parameters:
comment
- the String to formatmaxLength
- the maximum number of characters per line
-
LineFormatter
LineFormatter(java.lang.String comment, int maxLength, java.lang.String prefix)
Creates a new LineFormatter for the given comment- Parameters:
comment
- the String to formatmaxLength
- the maximum number of characters per lineprefix
- a prefix to append to the beginning of each line
-
-
Method Detail
-
hasMoreLines
boolean hasMoreLines()
-
nextLine
java.lang.String nextLine()
-
setPrefix
void setPrefix(java.lang.String prefix)
Sets the prefix that should be appended to the beginning of each line- Parameters:
prefix
- the prefix for this LineFormatter
-
isBreakable
private boolean isBreakable(char ch)
-
isWhitespace
private boolean isWhitespace(char ch)
-
isNewLine
private boolean isNewLine(char ch)
-
-