Class SourceWriter
- java.lang.Object
-
- org.teavm.backend.javascript.codegen.SourceWriter
-
- All Implemented Interfaces:
Appendable,LocationProvider
public class SourceWriter extends Object implements Appendable, LocationProvider
-
-
Method Summary
-
-
-
Method Detail
-
append
public SourceWriter append(String value) throws IOException
- Throws:
IOException
-
append
public SourceWriter append(int value) throws IOException
- Throws:
IOException
-
append
public SourceWriter append(char value) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
public SourceWriter append(CharSequence csq) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
public SourceWriter append(CharSequence csq, int start, int end) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
appendClass
public SourceWriter appendClass(String cls) throws IOException
- Throws:
IOException
-
appendClass
public SourceWriter appendClass(Class<?> cls) throws IOException
- Throws:
IOException
-
appendField
public SourceWriter appendField(FieldReference field) throws IOException
- Throws:
IOException
-
appendStaticField
public SourceWriter appendStaticField(FieldReference field) throws IOException
- Throws:
IOException
-
appendMethod
public SourceWriter appendMethod(MethodDescriptor method) throws IOException
- Throws:
IOException
-
appendMethod
public SourceWriter appendMethod(String name, Class<?>... params) throws IOException
- Throws:
IOException
-
appendMethodBody
public SourceWriter appendMethodBody(MethodReference method) throws IOException
- Throws:
IOException
-
appendMethodBody
public SourceWriter appendMethodBody(String className, String name, ValueType... params) throws IOException
- Throws:
IOException
-
appendMethodBody
public SourceWriter appendMethodBody(Class<?> cls, String name, Class<?>... params) throws IOException
- Throws:
IOException
-
appendFunction
public SourceWriter appendFunction(String name) throws IOException
- Throws:
IOException
-
appendInit
public SourceWriter appendInit(MethodReference method) throws IOException
- Throws:
IOException
-
appendClassInit
public SourceWriter appendClassInit(String className) throws IOException
- Throws:
IOException
-
newLine
public SourceWriter newLine() throws IOException
- Throws:
IOException
-
ws
public SourceWriter ws() throws IOException
- Throws:
IOException
-
tokenBoundary
public SourceWriter tokenBoundary() throws IOException
- Throws:
IOException
-
softNewLine
public SourceWriter softNewLine() throws IOException
- Throws:
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
-
-