|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.instruction.GenericStartInstruction freemarker.template.instruction.LocalInstruction
public final class LocalInstruction
An instruction representing a local instruction.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface freemarker.template.TemplateProcessor |
---|
TemplateProcessor.ExitStatus |
Nested classes/interfaces inherited from interface freemarker.template.instruction.Instruction |
---|
Instruction.EndType |
Field Summary |
---|
Fields inherited from class freemarker.template.instruction.GenericStartInstruction |
---|
body |
Constructor Summary | |
---|---|
LocalInstruction(java.util.List<Identifier> localVariables)
Constructor that takes a list of local variable identifiers to indicate which variables should be interpreted as local to this scope. |
Method Summary | |
---|---|
void |
addFunction(java.lang.String name,
TemplateFunctionModel function)
Adds an inner function to this function. |
TemplateProcessor |
callBuilder(TemplateBuilder builder)
Call the TemplateBuilder with
this local instruction. |
TemplateFunctionModel |
getFunction(java.lang.String name)
Retrieves an inner function from this function. |
java.util.Set<java.lang.String> |
getFunctionNames()
Retrieve a Set of inner function names for this function. |
TemplateProcessor.ExitStatus |
process(TemplateProcessorParameters p)
Evaluate this <local> instruction. |
boolean |
testEndInstruction(Instruction endInstruction)
Is this the right kind of instruction for the given EndInstruction ? |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class freemarker.template.instruction.GenericStartInstruction |
---|
getEndType, isEndInstruction, setBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocalInstruction(java.util.List<Identifier> localVariables)
localVariables
- the list of local variables, or empty to indicate
all variables are localMethod Detail |
---|
public boolean testEndInstruction(Instruction endInstruction)
EndInstruction
?
testEndInstruction
in interface ContainerInstruction
endInstruction
- the end instruction we're testing
true
if the EndInstruction
is a
local end instruction, otherwise false
public TemplateProcessor.ExitStatus process(TemplateProcessorParameters p) throws java.io.IOException
<local>
instruction.
process
in interface TemplateProcessor
p
- template processing parameters
java.io.IOException
- an IO error occurred during processingpublic TemplateProcessor callBuilder(TemplateBuilder builder) throws ParseException
TemplateBuilder
with
this local instruction.
callBuilder
in interface Instruction
callBuilder
in class GenericStartInstruction
builder
- the TemplateBuilder
to be called back
ParseException
public TemplateFunctionModel getFunction(java.lang.String name)
CallInstruction
s at run-time.
getFunction
in interface FunctionTemplateProcessor
name
- the name of the function to be retrievedpublic java.util.Set<java.lang.String> getFunctionNames()
Set
of inner function names for this function.
getFunctionNames
in interface FunctionTemplateProcessor
Set
of inner function names (String
objects)
that have been defined for this template.public void addFunction(java.lang.String name, TemplateFunctionModel function) throws java.lang.IllegalStateException
TemplateBuilder
at compile-time.
addFunction
in interface FunctionTemplateProcessor
name
- the name of the function to be storedfunction
- the inner function to be stored by this function
java.lang.IllegalStateException
- the method has been called after the
template has been compiledpublic java.lang.String toString()
toString
in class java.lang.Object
String
representing this instruction subtree
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |