public class SimpleCodeWriter extends java.lang.Object implements ICodeWriter
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.StringBuilder |
buf |
protected int |
indent |
protected java.lang.String |
indentStr |
INDENT_STR, NL| Constructor and Description |
|---|
SimpleCodeWriter() |
SimpleCodeWriter(JadxArgs args) |
protected java.lang.StringBuilder buf
protected java.lang.String indentStr
protected int indent
public SimpleCodeWriter()
public SimpleCodeWriter(JadxArgs args)
public boolean isMetadataSupported()
isMetadataSupported in interface ICodeWriterpublic SimpleCodeWriter startLine()
startLine in interface ICodeWriterpublic SimpleCodeWriter startLine(char c)
startLine in interface ICodeWriterpublic SimpleCodeWriter startLine(java.lang.String str)
startLine in interface ICodeWriterpublic SimpleCodeWriter startLineWithNum(int sourceLine)
startLineWithNum in interface ICodeWriterpublic SimpleCodeWriter addMultiLine(java.lang.String str)
addMultiLine in interface ICodeWriterpublic SimpleCodeWriter add(java.lang.String str)
add in interface ICodeWriterpublic SimpleCodeWriter add(char c)
add in interface ICodeWriterpublic ICodeWriter add(ICodeWriter cw)
add in interface ICodeWriterpublic SimpleCodeWriter newLine()
newLine in interface ICodeWriterpublic SimpleCodeWriter addIndent()
addIndent in interface ICodeWriterprotected void addLine()
protected SimpleCodeWriter addLineIndent()
public void incIndent()
incIndent in interface ICodeWriterpublic void decIndent()
decIndent in interface ICodeWriterpublic int getIndent()
getIndent in interface ICodeWriterpublic void setIndent(int indent)
setIndent in interface ICodeWriterpublic int getLine()
ICodeWritergetLine in interface ICodeWriterpublic int getLineStartPos()
ICodeWritergetLineStartPos in interface ICodeWriterpublic void attachDefinition(ICodeNodeRef obj)
attachDefinition in interface ICodeWriterpublic void attachAnnotation(ICodeAnnotation obj)
attachAnnotation in interface ICodeWriterpublic void attachLineAnnotation(ICodeAnnotation obj)
attachLineAnnotation in interface ICodeWriterpublic void attachSourceLine(int sourceLine)
attachSourceLine in interface ICodeWriterpublic ICodeInfo finish()
finish in interface ICodeWriterprotected void removeFirstEmptyLine()
public int getLength()
getLength in interface ICodeWriterpublic java.lang.StringBuilder getRawBuf()
getRawBuf in interface ICodeWriterpublic java.util.Map<java.lang.Integer,ICodeAnnotation> getRawAnnotations()
getRawAnnotations in interface ICodeWriterpublic java.lang.String getCodeStr()
getCodeStr in interface ICodeWriterpublic java.lang.String toString()
toString in class java.lang.Object