net.jangaroo.jooc
Class JsWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by net.jangaroo.jooc.JsWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public final class JsWriter
extends FilterWriter

Author:
Andreas Gawecki

Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
JsWriter(Writer target)
           
 
Method Summary
 void beginComment()
           
 void beginCommentWriteSymbol(JooSymbol symbol)
           
 void beginString()
           
 void close()
           
 void endComment()
           
 void endString()
           
 boolean getKeepLines()
           
 boolean getKeepSource()
           
 JoocOptions getOptions()
           
 String getQualifiedNameAsIde(IdeDeclaration ideDeclaration)
           
 boolean isWritingComment()
           
 void setOptions(JoocOptions options)
           
 void setSuppressWhitespace(boolean suppressWhitespace)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(String str, int off, int len)
           
 void writeArray(Object[] items)
           
 void writeDate(Calendar value)
           
 void writeDate(Date value)
           
 void writeInt(int value)
           
protected  void writeLines(String s)
           
protected  void writeLines(String s, int off, int len)
           
 void writeObject(Object o)
           
 void writeString(String value)
           
 void writeSymbol(JooSymbol symbol)
           
 void writeSymbol(JooSymbol symbol, boolean withWhitespace)
           
 void writeSymbolToken(JooSymbol symbol)
           
 void writeSymbolWhitespace(JooSymbol symbol)
           
 void writeToken(String token)
           
 
Methods inherited from class java.io.FilterWriter
flush
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsWriter

public JsWriter(Writer target)
Method Detail

setOptions

public void setOptions(JoocOptions options)

getOptions

public JoocOptions getOptions()

getKeepSource

public boolean getKeepSource()

getKeepLines

public boolean getKeepLines()

writeInt

public void writeInt(int value)
              throws IOException
Throws:
IOException

writeString

public void writeString(String value)
                 throws IOException
Throws:
IOException

writeDate

public void writeDate(Date value)
               throws IOException
Throws:
IOException

writeDate

public void writeDate(Calendar value)
               throws IOException
Throws:
IOException

writeObject

public void writeObject(Object o)
                 throws IOException
Throws:
IOException

writeArray

public void writeArray(Object[] items)
                throws IOException
Throws:
IOException

beginComment

public void beginComment()
                  throws IOException
Throws:
IOException

endComment

public void endComment()
                throws IOException
Throws:
IOException

beginCommentWriteSymbol

public void beginCommentWriteSymbol(JooSymbol symbol)
                             throws IOException
Throws:
IOException

beginString

public void beginString()
                 throws IOException
Throws:
IOException

endString

public void endString()
               throws IOException
Throws:
IOException

setSuppressWhitespace

public void setSuppressWhitespace(boolean suppressWhitespace)

writeSymbolWhitespace

public void writeSymbolWhitespace(JooSymbol symbol)
                           throws IOException
Throws:
IOException

writeLines

protected void writeLines(String s)
                   throws IOException
Throws:
IOException

writeLines

protected void writeLines(String s,
                          int off,
                          int len)
                   throws IOException
Throws:
IOException

writeToken

public void writeToken(String token)
                throws IOException
Throws:
IOException

writeSymbol

public void writeSymbol(JooSymbol symbol)
                 throws IOException
Throws:
IOException

writeSymbol

public void writeSymbol(JooSymbol symbol,
                        boolean withWhitespace)
                 throws IOException
Throws:
IOException

writeSymbolToken

public void writeSymbolToken(JooSymbol symbol)
                      throws IOException
Throws:
IOException

write

public void write(int c)
           throws IOException
Overrides:
write in class FilterWriter
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterWriter
Throws:
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterWriter
Throws:
IOException

getQualifiedNameAsIde

public String getQualifiedNameAsIde(IdeDeclaration ideDeclaration)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterWriter
Throws:
IOException

isWritingComment

public boolean isWritingComment()


Copyright © 2002–2014 CoreMedia AG. All rights reserved.