public interface ExtensionMacro
An interface for macros to be used in extension.xml.
This interface works in conjunction with extension-macro-definition-hook
.
Implementors must have an empty constructor.
Modifier and Type | Method and Description |
---|---|
boolean |
canExpandMacro(java.lang.String unexpandedMacro,
ElementContext elementContext)
Answers whether this unexpanded macro may be handled by this extension macro.
|
java.lang.String |
expandMacro(java.lang.String unexpandedMacro,
ElementContext elementContext)
Given an unexpanded macro, expand it and return the expanded string.
|
java.lang.String expandMacro(java.lang.String unexpandedMacro, ElementContext elementContext)
unexpandedMacro
- unexpanded macroelementContext
- the extension traversal element contextboolean canExpandMacro(java.lang.String unexpandedMacro, ElementContext elementContext)
true
then ExtensionMacro#expandMacro(String)
will be called.unexpandedMacro
- the unexpanded macroelementContext
- the extension traversal element context