|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.java.JSFormatter
public class JSFormatter
Field Summary | |
---|---|
JSBeautifier |
beautifier
|
Constructor Summary | |
---|---|
JSFormatter()
Constructor for JSFormatter |
Method Summary | |
---|---|
void |
format(java.io.BufferedReader inReader,
java.io.PrintWriter outWriter)
Format source code that is read from inReader, and print the formatted result to outWriter. |
java.lang.String |
format(java.lang.String line)
|
void |
formatLine(java.lang.String line)
format a line of source code. formatLine should NOT be called if there are still formatted lines ready to be collected. |
boolean |
hasMoreFormattedLines()
Check if the formatter has more formatted lines to return. |
void |
init()
Initialize the formatter so that it is ready for the formation of a new file of source code. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
nextFormattedLine()
Get the next formatted line. |
void |
setBracketBreak(boolean br)
|
void |
setBracketIndent(boolean state)
|
void |
setLineLengthDeviation(int dev)
|
void |
setNestedConnection(boolean nest)
|
void |
setPreferredLineLength(int length)
|
void |
setSwitchIndent(boolean state)
|
void |
summarize()
summarize() is to be called when there are no more lines of unformatted source code to be passed to the formatter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public JSBeautifier beautifier
Constructor Detail |
---|
public JSFormatter()
Method Detail |
---|
public static void main(java.lang.String[] args)
public void init()
public void format(java.io.BufferedReader inReader, java.io.PrintWriter outWriter) throws java.io.IOException
inReader
- a BufferedReader from which to input original source codeoutWriter
- a PrintWriter to output beutified source code to
java.io.IOException
public boolean hasMoreFormattedLines()
public void formatLine(java.lang.String line)
line
- a line of source code to be formatted.public java.lang.String nextFormattedLine()
public void summarize()
public void setBracketBreak(boolean br)
public void setBracketIndent(boolean state)
public void setSwitchIndent(boolean state)
public void setPreferredLineLength(int length)
public void setLineLengthDeviation(int dev)
public void setNestedConnection(boolean nest)
public java.lang.String format(java.lang.String line)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |