public class Allmacros extends AbstractTemplateFunction
{{ #all_macros: ... }} syntax.
The function lists all available template functions documentation. To show
the documentation of a function, the ITemplateFunction#getFunctionDoc() must
be implemented.
This function isn't included in the default parser functions map. Use
Configuration.addTemplateFunction("#all_macros", Allmacros.CONST)
to add the template to your configuration.| Modifier and Type | Field and Description |
|---|---|
static ITemplateFunction |
CONST |
| Constructor and Description |
|---|
Allmacros() |
| Modifier and Type | Method and Description |
|---|---|
String |
getFunctionDoc()
Return a short description of the implemented template function
|
String |
parseFunction(List<String> parts,
IWikiModel model,
char[] src,
int beginIndex,
int endIndex,
boolean isSubst)
Parse a template function (like for example
{{ #if: ... |
parse, parseTrimpublic static final ITemplateFunction CONST
public String getFunctionDoc()
ITemplateFunctiongetFunctionDoc in interface ITemplateFunctiongetFunctionDoc in class AbstractTemplateFunctionpublic String parseFunction(List<String> parts, IWikiModel model, char[] src, int beginIndex, int endIndex, boolean isSubst) throws IOException
AbstractTemplateFunction{{ #if: ... }}).
The result is also a text string in Wikipedia syntax notation which will be
parsed again (recursively) in the TemplateParser step.parseFunction in interface ITemplateFunctionparseFunction in class AbstractTemplateFunctionparts - the parser function arguments (extracted from the wiki text by
splitting the string at the pipe symbol ´|´)model - the wiki modelsrc - the array of the current Wikipedia source text.beginIndex - the beginning index, inclusive.endIndex - the ending index, exclusive.isSubst - if true the template function was called from
subst or safesubst function and the arguments of
the function are typically not parsed recursively.null if
the parsing fails or isn't valid.IOExceptionTemplateParser#parseTemplate(StringBuffer)Copyright © 2017 Java Wikipedia API (Bliki engine). All rights reserved.