public class MacroInfo extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MACRO_START
Define the comment marker for starting a macro.
|
static String |
MACRO_STOP
Define the comment marker for finishing a macro.
|
Constructor and Description |
---|
MacroInfo(String content)
Build a MacroInfo based on the content of a comment.
|
Modifier and Type | Method and Description |
---|---|
String |
getContent() |
WikiScannerContext |
getContentScannerContext() |
String |
getName() |
WikiParameters |
getParameters() |
WikiScannerContext |
getParameterScannerContext(String parameter) |
void |
setContent(String content)
Allow to specify the content of the macro when changed in a non generated content block.
|
void |
setContentScannerContext(WikiScannerContext contentScannerContext) |
void |
setParameters(WikiParameters parameters)
Allow to set new parameters for this macro.
|
void |
setParameterScannerContext(String parameter,
WikiScannerContext scannerContext) |
public static final String MACRO_START
public static final String MACRO_STOP
public MacroInfo(String content)
content
- A comment representing a macro.
It must start with a startmacro comment marker MACRO_START
.public String getName()
public WikiParameters getParameters()
public void setParameters(WikiParameters parameters)
parameters
- the parameters to set.public String getContent()
public void setContent(String content)
content
- the new content of the macro.public WikiScannerContext getContentScannerContext()
public void setContentScannerContext(WikiScannerContext contentScannerContext)
contentScannerContext
- the scanner context that is used to parse the content of the macro.public void setParameterScannerContext(String parameter, WikiScannerContext scannerContext)
parameter
- a parameter name of the macroscannerContext
- the scanner context that is used to parse the specified parameter of the macro.public WikiScannerContext getParameterScannerContext(String parameter)
parameter
- a parameter name of the macroCopyright © 2004–2021 XWiki. All rights reserved.