org.exolab.javasource
Class LineFormatter

java.lang.Object
  extended by org.exolab.javasource.LineFormatter

 class LineFormatter
extends java.lang.Object

Formats a given String for use within a Java comment

Author:
Keith Visco

Field Summary
(package private)  java.lang.String comment
           
(package private)  int length
           
(package private)  int maxLength
           
(package private)  int offset
           
(package private)  java.lang.String prefix
           
 
Constructor Summary
LineFormatter(java.lang.String comment)
          Creates a LineFormatter for the given comment
LineFormatter(java.lang.String comment, int maxLength)
          Creates a new LineFormatter for the given comment
LineFormatter(java.lang.String comment, int maxLength, java.lang.String prefix)
          Creates a new LineFormatter for the given comment
 
Method Summary
(package private)  boolean hasMoreLines()
           
(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comment

java.lang.String comment

maxLength

int maxLength

offset

int offset

length

int length

prefix

java.lang.String prefix
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 format
maxLength - 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 format
maxLength - the maximum number of characters per line
prefix - 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


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com