Class LookaheadWikiPrinter
java.lang.Object
org.xwiki.rendering.renderer.printer.WrappingWikiPrinter
org.xwiki.rendering.renderer.printer.LookaheadWikiPrinter
- All Implemented Interfaces:
WikiPrinter
Wiki printer that allows deferring printing text and that instead can save it in some internal buffer. This allows
accumulating some content before it's flushed. This feature is used for example in the XWiki Syntax Renderer to
accumulate text so that it be reviewed and escaped before printed (indeed some text has some characters that need to
be escaped or they'd have a wiki meaning otherwise).
- Since:
- 1.7
- Version:
- $Id: 782b20abbf121e905e63b58a221ee6a21bb2f9fe $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()protected StringgetEOL()This method is protected to allow classes extending this one to define what a new line is.voidvoidprintDelayed(String text) protected voidprintInternal(String text) voidvoidprintlnDelayed(String text) protected voidprintlnInternal(String text) Methods inherited from class org.xwiki.rendering.renderer.printer.WrappingWikiPrinter
getWrappedPrinter, toString
-
Constructor Details
-
LookaheadWikiPrinter
-
-
Method Details
-
printInternal
-
printlnInternal
-
print
- Specified by:
printin interfaceWikiPrinter- Overrides:
printin classWrappingWikiPrinter- Parameters:
text- print the providedString.
-
println
- Specified by:
printlnin interfaceWikiPrinter- Overrides:
printlnin classWrappingWikiPrinter- Parameters:
text- print the providedStringand add a new line.
-
printDelayed
-
printlnDelayed
-
getBuffer
-
flush
public void flush() -
getEOL
This method is protected to allow classes extending this one to define what a new line is.- Returns:
- a new line symbols
-