public class MacroBlock extends AbstractMacroBlock
Note: You can get macro parameters using AbstractBlock.getParameters()
for example. Macro block is reusing Block standard
custom parameters API since macro by definition already have parameters and don't need also block parameters. So in
this case MacroBlock parameters and Block parameters are the same thing.
Block.Axes
LIST_BLOCK_TYPE
Constructor and Description |
---|
MacroBlock(String id,
Map<String,String> parameters,
boolean isInline) |
MacroBlock(String id,
Map<String,String> parameters,
String content,
boolean isInline) |
Modifier and Type | Method and Description |
---|---|
void |
traverse(Listener listener)
Let the block send
Listener events corresponding to its content. |
equals, getContent, getId, hashCode, isInline
addChild, addChildren, after, before, clone, clone, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, indexOf, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock
public MacroBlock(String id, Map<String,String> parameters, boolean isInline)
id
- the id of the macroparameters
- the parameters of the macroisInline
- indicate if the macro is located in a inline content (like paragraph, etc.)public MacroBlock(String id, Map<String,String> parameters, String content, boolean isInline)
id
- the id of the macroparameters
- the parameters of the macrocontent
- the content of the macro. Null if the macro does not have contentisInline
- indicate if the macro is located in a inline content (like paragraph, etc.)public void traverse(Listener listener)
Block
Listener
events corresponding to its content. For example a Paragraph block will send
the Listener.beginParagraph(java.util.Map<java.lang.String, java.lang.String>)
and
Listener.endParagraph(java.util.Map<java.lang.String, java.lang.String>)
events when this method is called.traverse
in interface Block
traverse
in class AbstractBlock
listener
- the listener to which to send the events to.Copyright © 2004–2021 XWiki. All rights reserved.