public abstract class Block extends Directive
Modifier and Type | Class and Description |
---|---|
static class |
Block.Reference
actual class placed in the context, holds the context
being used for the render, as well as the parent (which already holds
everything else we need).
|
Modifier and Type | Field and Description |
---|---|
protected Node |
block |
protected String |
key |
protected org.slf4j.Logger |
log |
protected int |
maxDepth |
BLOCK, LINE
Constructor and Description |
---|
Block() |
Modifier and Type | Method and Description |
---|---|
int |
getType()
Return type of this directive.
|
protected String |
id(InternalContextAdapter context)
Creates a string identifying the source and location of the block
definition, and the current template being rendered if that is
different.
|
void |
init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - get the key
|
boolean |
render(InternalContextAdapter context,
Writer writer)
renders block directive
|
checkArgs, getColumn, getLine, getName, getScopeName, getTemplate, getTemplateName, isScopeProvided, makeScope, postRender, preRender, render, setLocation, setLocation
protected Node block
protected org.slf4j.Logger log
protected int maxDepth
protected String key
public int getType()
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
init
in class Directive
rs
- context
- node
- TemplateInitException
public boolean render(InternalContextAdapter context, Writer writer)
context
- writer
- protected String id(InternalContextAdapter context)
context
- Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.