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