public class Foreach extends Directive
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Foreach.NullHolderContext
A special context to use when the foreach iterator returns a null.
|
| Modifier and Type | Field and Description |
|---|---|
protected Info |
uberInfo
immutable, so create in init
|
BLOCK, LINE| Constructor and Description |
|---|
Foreach() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clean(InternalContextAdapter context,
Object o,
Object savedCounter,
Object nextFlag) |
String |
getName()
Return name of this directive.
|
int |
getType()
Return type of this directive.
|
void |
init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - init the tree and get the elementKey from
the AST
|
protected void |
put(InternalContextAdapter context,
String key,
Object value)
Extension hook to allow subclasses to control whether loop vars
are set locally or not.
|
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node)
renders the #foreach() block
|
getColumn, getLine, getScopeName, getTemplateName, isScopeProvided, makeScope, postRender, preRender, setLocation, setLocationprotected Info uberInfo
public String getName()
public int getType()
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
init in class Directivers - context - node - TemplateInitExceptionprotected void put(InternalContextAdapter context, String key, Object value)
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, MethodInvocationException, ResourceNotFoundException, ParseErrorException
render in class Directivecontext - writer - node - IOExceptionMethodInvocationExceptionResourceNotFoundExceptionParseErrorExceptionprotected void clean(InternalContextAdapter context, Object o, Object savedCounter, Object nextFlag)
Copyright © 2000–2016. All rights reserved.