jindent
Class Formatter

java.lang.Object
  extended by jindent.Formatter
Direct Known Subclasses:
jindent.formatter.InternalFormatter

public class Formatter
extends Object

The Jindent formatter module. This class can be used to format from a Reader to Writer or just to format Strings.


Method Summary
 void format(Reader in, Writer out)
          Formats a String.
 String format(String input)
          Formats a String.
 MessageList getMessageList()
          Returns the message list.
 Settings getSettings()
          Gets Jindent settings.
 void setSettings(Settings settings)
          Sets Jindent settings.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setSettings

public void setSettings(Settings settings)
Sets Jindent settings.

Parameters:
settings - Jindent settings

getSettings

public Settings getSettings()
Gets Jindent settings.

Returns:
Jindent settings

format

public String format(String input)
              throws JindentException
Formats a String.

Parameters:
input - input source code
Returns:
formatted output source code
Throws:
JindentException - if anything went wrong while formatting

format

public void format(Reader in,
                   Writer out)
            throws JindentException
Formats a String.

Parameters:
in - Reader pointing to source code input
out - Writer where the formatted output will be written to
Throws:
JindentException - if anything went wrong while formatting

getMessageList

public MessageList getMessageList()
Returns the message list. A message list cotains messages, warnings and errors about events which happened while formatting process.

Returns:
message list