public class VelocimacroFactory
extends java.lang.Object
| 构造器和说明 |
|---|
VelocimacroFactory(RuntimeServices rsvc)
C'tor for the VelociMacro factory.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addVelocimacro(java.lang.String name,
Node macroBody,
java.lang.String[] argArray,
java.lang.String sourceTemplate)
Adds a macro to the factory.
|
boolean |
addVelocimacro(java.lang.String name,
java.lang.String macroBody,
java.lang.String[] argArray,
java.lang.String sourceTemplate)
Adds a macro to the factory.
|
boolean |
dumpVMNamespace(java.lang.String namespace)
tells the vmManager to dump the specified namespace
|
Directive |
getVelocimacro(java.lang.String vmName,
java.lang.String sourceTemplate)
actual factory : creates a Directive that will
behave correctly wrt getting the framework to
dig out the correct # of args
|
Directive |
getVelocimacro(java.lang.String vmName,
java.lang.String sourceTemplate,
java.lang.String renderingTemplate) |
void |
initVelocimacro()
initialize the factory - setup all permissions
load all global libraries.
|
boolean |
isVelocimacro(java.lang.String vm,
java.lang.String sourceTemplate)
Tells the world if a given directive string is a Velocimacro
|
public VelocimacroFactory(RuntimeServices rsvc)
rsvc - Reference to a runtime services object.public void initVelocimacro()
public boolean addVelocimacro(java.lang.String name,
java.lang.String macroBody,
java.lang.String[] argArray,
java.lang.String sourceTemplate)
name - Name of the Macro to add.macroBody - String representation of the macro.argArray - Macro arguments. First element is the macro name.sourceTemplate - Source template from which the macro gets registered.public boolean addVelocimacro(java.lang.String name,
Node macroBody,
java.lang.String[] argArray,
java.lang.String sourceTemplate)
name - Name of the Macro to add.macroBody - root node of the parsed macro ASTargArray - Name of the macro arguments. First element is the macro name.sourceTemplate - Source template from which the macro gets registered.public boolean isVelocimacro(java.lang.String vm,
java.lang.String sourceTemplate)
vm - Name of the Macro.sourceTemplate - Source template from which the macro should be loaded.public Directive getVelocimacro(java.lang.String vmName, java.lang.String sourceTemplate)
vmName - Name of the Macro.sourceTemplate - Source template from which the macro should be loaded.public Directive getVelocimacro(java.lang.String vmName, java.lang.String sourceTemplate, java.lang.String renderingTemplate)
public boolean dumpVMNamespace(java.lang.String namespace)
namespace - Namespace to dump.