Class IndentWriter
- java.lang.Object
-
- java.io.Writer
-
- org.infinispan.protostream.annotations.impl.IndentWriter
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public final class IndentWriter extends Writer
A Writer capable of appending Strings in a similar manner to StringWriter but with indentation capabilities to support more readable code generation. No IOExceptions are ever thrown. Closing has no effect.- Since:
- 3.0
- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description IndentWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndentWriter
append(char c)
IndentWriter
append(CharSequence cs)
IndentWriter
append(CharSequence cs, int start, int end)
void
close()
IndentWriter
dec()
Decrease indentation.void
flush()
IndentWriter
inc()
Increase indentation.String
toString()
void
write(char[] buf, int off, int len)
void
write(int c)
void
write(String s)
void
write(String s, int off, int len)
-
Methods inherited from class java.io.Writer
nullWriter, write
-
-
-
-
Method Detail
-
inc
public IndentWriter inc()
Increase indentation.
-
dec
public IndentWriter dec()
Decrease indentation.
-
append
public IndentWriter append(CharSequence cs)
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
append
public IndentWriter append(CharSequence cs, int start, int end)
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
append
public IndentWriter append(char c)
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
flush
public void flush()
-
-