net.jangaroo.jooc
Class JsWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
net.jangaroo.jooc.JsWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public final class JsWriter
- extends FilterWriter
- Author:
- Andreas Gawecki
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsWriter
public JsWriter(Writer target)
setOptions
public void setOptions(JoocOptions options)
setWriteActionScriptApi
public void setWriteActionScriptApi(boolean writeActionScriptApi)
getOptions
public JoocOptions getOptions()
isWriteActionScriptApi
public boolean isWriteActionScriptApi()
getKeepSource
public boolean getKeepSource()
getKeepLines
public boolean getKeepLines()
getEnableAssertions
public boolean getEnableAssertions()
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
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
writeSymbol
public void writeSymbol(JooSymbol symbol,
String prefix,
String postfix)
throws IOException
- Variant of writeSymbol() to use if you want to transform the symbol text with a prefix and/or postfix string
- Parameters:
symbol - the symbol to writeprefix - a (possibly empty) string to write before the symbol token stringpostfix - a (possibly empty) string to write after the symbol token string
- Throws:
IOException - if an IO error occurs
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)
getFunctionNameAsIde
public String getFunctionNameAsIde(net.jangaroo.jooc.FunctionExpr functionExpr)
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class FilterWriter
- Throws:
IOException
Copyright © 2002-2011 CoreMedia AG. All Rights Reserved.