org.jibx.schema.codegen
Class SourceBuilder.WriterVisitor
java.lang.Object
TextEditVisitor
org.jibx.schema.codegen.SourceBuilder.WriterVisitor
- Enclosing class:
- SourceBuilder
private static class SourceBuilder.WriterVisitor
- extends TextEditVisitor
Visitor to apply edits. This is used to avoid the overhead of standard document processing of the edits generated
by formatting.
Method Summary |
private void |
copy(int offset)
|
void |
finish()
Finish writing output. |
private void |
skip(int offset)
|
boolean |
visit(DeleteEdit edit)
|
boolean |
visit(InsertEdit edit)
|
boolean |
visit(ReplaceEdit edit)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_base
private final java.lang.String m_base
m_writer
private final java.io.Writer m_writer
m_offset
private int m_offset
SourceBuilder.WriterVisitor
public SourceBuilder.WriterVisitor(java.lang.String base,
java.io.Writer writer)
- Constructor.
- Parameters:
base
- writer
-
skip
private void skip(int offset)
copy
private void copy(int offset)
visit
public boolean visit(DeleteEdit edit)
visit
public boolean visit(InsertEdit edit)
visit
public boolean visit(ReplaceEdit edit)
finish
public void finish()
- Finish writing output. This needs to be called after visiting the tree, to catch any final bits at the end.