Class RememberingSourceWriter
java.lang.Object
org.teavm.backend.javascript.codegen.SourceWriter
org.teavm.backend.javascript.codegen.RememberingSourceWriter
- All Implemented Interfaces:
Appendable
,SourceWriterSink
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionappend
(char value) append
(CharSequence csq, int start, int end) appendClass
(String cls) appendClassInit
(String className) appendField
(FieldReference field) appendFunction
(String name) appendGlobal
(String name) appendInit
(MethodReference method) appendMethod
(MethodDescriptor method) appendMethodBody
(MethodReference method) appendStaticField
(FieldReference field) void
clear()
void
emitLocation
(String fileName, int line) void
emitMethod
(MethodDescriptor method) emitVariables
(String[] names, String jsName) void
flush()
indent()
void
void
markClassStart
(String className) void
void
markSectionStart
(int id) newLine()
outdent()
save()
ws()
Methods inherited from class org.teavm.backend.javascript.codegen.SourceWriter
append, append, append, appendBlockEnd, appendBlockStart, appendClass, appendElse, appendElseIf, appendIf, appendMethod, appendMethodBody, appendMethodBody
-
Constructor Details
-
RememberingSourceWriter
public RememberingSourceWriter(boolean debug)
-
-
Method Details
-
clear
public void clear() -
append
- Specified by:
append
in interfaceAppendable
- Specified by:
append
in classSourceWriter
-
append
- Specified by:
append
in interfaceAppendable
- Specified by:
append
in interfaceSourceWriterSink
- Specified by:
append
in classSourceWriter
-
appendClass
- Specified by:
appendClass
in interfaceSourceWriterSink
- Specified by:
appendClass
in classSourceWriter
-
appendField
- Specified by:
appendField
in interfaceSourceWriterSink
- Specified by:
appendField
in classSourceWriter
-
appendStaticField
- Specified by:
appendStaticField
in interfaceSourceWriterSink
- Specified by:
appendStaticField
in classSourceWriter
-
appendMethod
- Specified by:
appendMethod
in interfaceSourceWriterSink
- Specified by:
appendMethod
in classSourceWriter
-
appendMethodBody
- Specified by:
appendMethodBody
in interfaceSourceWriterSink
- Specified by:
appendMethodBody
in classSourceWriter
-
appendFunction
- Specified by:
appendFunction
in interfaceSourceWriterSink
- Specified by:
appendFunction
in classSourceWriter
-
appendGlobal
- Specified by:
appendGlobal
in interfaceSourceWriterSink
- Specified by:
appendGlobal
in classSourceWriter
-
appendInit
- Specified by:
appendInit
in interfaceSourceWriterSink
- Specified by:
appendInit
in classSourceWriter
-
appendClassInit
- Specified by:
appendClassInit
in interfaceSourceWriterSink
- Specified by:
appendClassInit
in classSourceWriter
-
newLine
- Specified by:
newLine
in interfaceSourceWriterSink
- Specified by:
newLine
in classSourceWriter
-
ws
- Specified by:
ws
in interfaceSourceWriterSink
- Specified by:
ws
in classSourceWriter
-
sameLineWs
- Specified by:
sameLineWs
in interfaceSourceWriterSink
- Specified by:
sameLineWs
in classSourceWriter
-
tokenBoundary
- Specified by:
tokenBoundary
in interfaceSourceWriterSink
- Specified by:
tokenBoundary
in classSourceWriter
-
softNewLine
- Specified by:
softNewLine
in interfaceSourceWriterSink
- Specified by:
softNewLine
in classSourceWriter
-
indent
- Specified by:
indent
in interfaceSourceWriterSink
- Specified by:
indent
in classSourceWriter
-
outdent
- Specified by:
outdent
in interfaceSourceWriterSink
- Specified by:
outdent
in classSourceWriter
-
emitLocation
- Specified by:
emitLocation
in interfaceSourceWriterSink
- Specified by:
emitLocation
in classSourceWriter
-
enterLocation
- Specified by:
enterLocation
in interfaceSourceWriterSink
- Specified by:
enterLocation
in classSourceWriter
-
exitLocation
- Specified by:
exitLocation
in interfaceSourceWriterSink
- Specified by:
exitLocation
in classSourceWriter
-
emitStatementStart
- Specified by:
emitStatementStart
in interfaceSourceWriterSink
- Specified by:
emitStatementStart
in classSourceWriter
-
emitVariables
- Specified by:
emitVariables
in interfaceSourceWriterSink
- Specified by:
emitVariables
in classSourceWriter
-
emitMethod
- Specified by:
emitMethod
in interfaceSourceWriterSink
- Specified by:
emitMethod
in classSourceWriter
-
emitClass
- Specified by:
emitClass
in interfaceSourceWriterSink
- Specified by:
emitClass
in classSourceWriter
-
markClassStart
- Specified by:
markClassStart
in interfaceSourceWriterSink
- Specified by:
markClassStart
in classSourceWriter
-
markClassEnd
public void markClassEnd()- Specified by:
markClassEnd
in interfaceSourceWriterSink
- Specified by:
markClassEnd
in classSourceWriter
-
markSectionStart
public void markSectionStart(int id) - Specified by:
markSectionStart
in interfaceSourceWriterSink
- Specified by:
markSectionStart
in classSourceWriter
-
markSectionEnd
public void markSectionEnd()- Specified by:
markSectionEnd
in interfaceSourceWriterSink
- Specified by:
markSectionEnd
in classSourceWriter
-
flush
public void flush() -
save
-