Class LineFormatter
java.lang.Object
org.codehaus.modello.plugin.java.javasource.LineFormatter
Formats a given String for use within a Java comment
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLineFormatter
(String comment) Creates a LineFormatter for the given commentLineFormatter
(String comment, int maxLength) Creates a new LineFormatter for the given commentLineFormatter
(String comment, int maxLength, String prefix) Creates a new LineFormatter for the given comment -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
private boolean
isBreakable
(char ch) private boolean
isNewLine
(char ch) private boolean
isWhitespace
(char ch) (package private) String
nextLine()
(package private) void
Sets the prefix that should be appended to the beginning of each line
-
Field Details
-
Constructor Details
-
LineFormatter
LineFormatter(String comment) Creates a LineFormatter for the given comment- Parameters:
comment
- the String to format
-
LineFormatter
LineFormatter(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
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 Details
-
hasMoreLines
boolean hasMoreLines() -
nextLine
String nextLine() -
setPrefix
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)
-