org.exolab.javasource

Class LineFormatter


(package private) class LineFormatter
extends java.lang.Object

Formats a given String for use within a Java comment
Author:
Keith Visco

Field Summary

(package private) String
comment
(package private) int
length
(package private) int
maxLength
(package private) int
offset
(package private) String
prefix

Constructor Summary

LineFormatter(String comment)
Creates a LineFormatter for the given comment
LineFormatter(String comment, int maxLength)
Creates a new LineFormatter for the given comment
LineFormatter(String comment, int maxLength, String prefix)
Creates a new LineFormatter for the given comment

Method Summary

(package private) boolean
hasMoreLines()
(package private) String
nextLine()
(package private) void
setPrefix(String prefix)
Sets the prefix that should be appended to the beginning of each line

Field Details

comment

(package private)  String comment

length

(package private)  int length

maxLength

(package private)  int maxLength

offset

(package private)  int offset

prefix

(package private)  String prefix

Constructor Details

LineFormatter

(package private)  LineFormatter(String comment)
Creates a LineFormatter for the given comment
Parameters:
comment - the String to format

LineFormatter

(package private)  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

(package private)  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

(package private)  boolean hasMoreLines()

nextLine

(package private)  String nextLine()

setPrefix

(package private)  void setPrefix(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-2003. All rights reserved http://www.intalio.com