net.jangaroo.jooc
Class JsWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
net.jangaroo.jooc.JsWriter
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable
public final class JsWriter
- extends java.io.FilterWriter
- Author:
- Andreas Gawecki
| Fields inherited from class java.io.FilterWriter |
out |
| Fields inherited from class java.io.Writer |
lock |
|
Constructor Summary |
JsWriter(java.io.Writer target)
|
| 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 |
JsWriter
public JsWriter(java.io.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 java.io.IOException
- Throws:
java.io.IOException
writeString
public void writeString(java.lang.String value)
throws java.io.IOException
- Throws:
java.io.IOException
writeDate
public void writeDate(java.util.Date value)
throws java.io.IOException
- Throws:
java.io.IOException
writeDate
public void writeDate(java.util.Calendar value)
throws java.io.IOException
- Throws:
java.io.IOException
writeObject
public void writeObject(java.lang.Object o)
throws java.io.IOException
- Throws:
java.io.IOException
writeArray
public void writeArray(java.lang.Object[] items)
throws java.io.IOException
- Throws:
java.io.IOException
beginComment
public void beginComment()
throws java.io.IOException
- Throws:
java.io.IOException
endComment
public void endComment()
throws java.io.IOException
- Throws:
java.io.IOException
beginCommentWriteSymbol
public void beginCommentWriteSymbol(JooSymbol symbol)
throws java.io.IOException
- Throws:
java.io.IOException
beginString
public void beginString()
throws java.io.IOException
- Throws:
java.io.IOException
endString
public void endString()
throws java.io.IOException
- Throws:
java.io.IOException
writeSymbolWhitespace
public void writeSymbolWhitespace(JooSymbol symbol)
throws java.io.IOException
- Throws:
java.io.IOException
writeLines
protected void writeLines(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
writeLines
protected void writeLines(java.lang.String s,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
writeToken
public void writeToken(java.lang.String token)
throws java.io.IOException
- Throws:
java.io.IOException
writeSymbol
public void writeSymbol(JooSymbol symbol)
throws java.io.IOException
- Throws:
java.io.IOException
writeSymbol
public void writeSymbol(JooSymbol symbol,
boolean withWhitespace)
throws java.io.IOException
- Throws:
java.io.IOException
writeSymbol
public void writeSymbol(JooSymbol symbol,
java.lang.String prefix,
java.lang.String postfix)
throws java.io.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:
java.io.IOException - if an IO error occurs
writeSymbolToken
public void writeSymbolToken(JooSymbol symbol)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(int c)
throws java.io.IOException
- Overrides:
write in class java.io.FilterWriter
- Throws:
java.io.IOException
write
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Overrides:
write in class java.io.FilterWriter
- Throws:
java.io.IOException
write
public void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
- Overrides:
write in class java.io.FilterWriter
- Throws:
java.io.IOException
getQualifiedNameAsIde
public java.lang.String getQualifiedNameAsIde(IdeDeclaration ideDeclaration)
getFunctionNameAsIde
public java.lang.String getFunctionNameAsIde(net.jangaroo.jooc.FunctionExpr functionExpr)
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.FilterWriter
- Throws:
java.io.IOException
Copyright © 2002-2010 CoreMedia AG. All Rights Reserved.