Class SourceWriter
- java.lang.Object
-
- org.teavm.backend.javascript.codegen.SourceWriter
-
- All Implemented Interfaces:
java.lang.Appendable,LocationProvider
public class SourceWriter extends java.lang.Object implements java.lang.Appendable, LocationProvider
-
-
Method Summary
-
-
-
Method Detail
-
append
public SourceWriter append(java.lang.String value) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public SourceWriter append(int value) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public SourceWriter append(char value) throws java.io.IOException
- Specified by:
appendin interfacejava.lang.Appendable- Throws:
java.io.IOException
-
append
public SourceWriter append(java.lang.CharSequence csq) throws java.io.IOException
- Specified by:
appendin interfacejava.lang.Appendable- Throws:
java.io.IOException
-
append
public SourceWriter append(java.lang.CharSequence csq, int start, int end) throws java.io.IOException
- Specified by:
appendin interfacejava.lang.Appendable- Throws:
java.io.IOException
-
appendClass
public SourceWriter appendClass(java.lang.String cls) throws java.io.IOException
- Throws:
java.io.IOException
-
appendClass
public SourceWriter appendClass(java.lang.Class<?> cls) throws java.io.IOException
- Throws:
java.io.IOException
-
appendField
public SourceWriter appendField(FieldReference field) throws java.io.IOException
- Throws:
java.io.IOException
-
appendStaticField
public SourceWriter appendStaticField(FieldReference field) throws java.io.IOException
- Throws:
java.io.IOException
-
appendMethod
public SourceWriter appendMethod(MethodDescriptor method) throws java.io.IOException
- Throws:
java.io.IOException
-
appendMethod
public SourceWriter appendMethod(java.lang.String name, java.lang.Class<?>... params) throws java.io.IOException
- Throws:
java.io.IOException
-
appendMethodBody
public SourceWriter appendMethodBody(MethodReference method) throws java.io.IOException
- Throws:
java.io.IOException
-
appendMethodBody
public SourceWriter appendMethodBody(java.lang.String className, java.lang.String name, ValueType... params) throws java.io.IOException
- Throws:
java.io.IOException
-
appendMethodBody
public SourceWriter appendMethodBody(java.lang.Class<?> cls, java.lang.String name, java.lang.Class<?>... params) throws java.io.IOException
- Throws:
java.io.IOException
-
appendFunction
public SourceWriter appendFunction(java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
appendInit
public SourceWriter appendInit(MethodReference method) throws java.io.IOException
- Throws:
java.io.IOException
-
appendClassInit
public SourceWriter appendClassInit(java.lang.String className) throws java.io.IOException
- Throws:
java.io.IOException
-
newLine
public SourceWriter newLine() throws java.io.IOException
- Throws:
java.io.IOException
-
ws
public SourceWriter ws() throws java.io.IOException
- Throws:
java.io.IOException
-
tokenBoundary
public SourceWriter tokenBoundary() throws java.io.IOException
- Throws:
java.io.IOException
-
softNewLine
public SourceWriter softNewLine() throws java.io.IOException
- Throws:
java.io.IOException
-
indent
public SourceWriter indent()
-
outdent
public SourceWriter outdent()
-
getNaming
public NamingStrategy getNaming()
-
getColumn
public int getColumn()
- Specified by:
getColumnin interfaceLocationProvider
-
getLine
public int getLine()
- Specified by:
getLinein interfaceLocationProvider
-
getOffset
public int getOffset()
- Specified by:
getOffsetin interfaceLocationProvider
-
-