Class LineFormatter

java.lang.Object
org.codehaus.modello.plugin.java.javasource.LineFormatter

class LineFormatter extends Object
Formats a given String for use within a Java comment
  • Field Details

    • comment

      String comment
    • maxLength

      int maxLength
    • offset

      int offset
    • length

      int length
    • prefix

      String prefix
    • sb

      private StringBuilder sb
  • 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 format
      maxLength - the maximum number of characters per line
    • LineFormatter

      LineFormatter(String comment, int maxLength, String prefix)
      Creates a new LineFormatter for the given comment
      Parameters:
      comment - the String to format
      maxLength - the maximum number of characters per line
      prefix - a prefix to append to the beginning of each line
  • Method Details

    • hasMoreLines

      boolean hasMoreLines()
    • nextLine

      String nextLine()
    • setPrefix

      void setPrefix(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)