Class ChildBlocksBuilder
- java.lang.Object
-
- org.apache.maven.doxia.module.confluence.parser.ChildBlocksBuilder
-
public class ChildBlocksBuilder extends java.lang.ObjectRe-usable builder that can be used to generate paragraph and list item text from a string containing all the content and wiki formatting. This class is intentionally stateful, but cheap to create, so create one as needed and keep it on the stack to preserve stateless behaviour in the caller.- Since:
- 1.1
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Block>blocksprivate java.lang.Stringinputprivate booleaninsideBoldprivate booleaninsideItalicprivate booleaninsideLinethroughprivate booleaninsideLinkprivate booleaninsideMonospacedprivate booleaninsideSubprivate booleaninsideSupprivate booleaninsideUnderlineprivate java.lang.StringBuildertext
-
Constructor Summary
Constructors Constructor Description ChildBlocksBuilder(java.lang.String input)Constructor for ChildBlocksBuilder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringBuilderaddTextBlockIfNecessary(java.util.List<Block> blcks, java.util.List<Block> specialBlocks, java.lang.StringBuilder txt)java.util.List<Block>getBlocks()Utility method to convert marked up content into blocks for rendering.private java.util.List<Block>getChildren(java.lang.StringBuilder buffer, java.util.List<Block> currentBlocks)private java.util.List<Block>getList(Block block, java.util.List<Block> currentBlocks)private static charnextChar(java.lang.String input, int i)
-
-
-
Field Detail
-
insideBold
private boolean insideBold
-
insideItalic
private boolean insideItalic
-
insideLink
private boolean insideLink
-
insideLinethrough
private boolean insideLinethrough
-
insideUnderline
private boolean insideUnderline
-
insideSub
private boolean insideSub
-
insideSup
private boolean insideSup
-
blocks
private java.util.List<Block> blocks
-
text
private java.lang.StringBuilder text
-
input
private java.lang.String input
-
insideMonospaced
private boolean insideMonospaced
-
-
Method Detail
-
getBlocks
public java.util.List<Block> getBlocks()
Utility method to convert marked up content into blocks for rendering.- Returns:
- a list of Blocks that can be used to render it
-
getChildren
private java.util.List<Block> getChildren(java.lang.StringBuilder buffer, java.util.List<Block> currentBlocks)
-
nextChar
private static char nextChar(java.lang.String input, int i)
-
-