Class Define
- java.lang.Object
-
- org.apache.velocity.runtime.directive.Directive
-
- org.apache.velocity.runtime.directive.Block
-
- org.apache.velocity.runtime.directive.Define
-
- All Implemented Interfaces:
java.lang.Cloneable
,DirectiveConstants
public class Define extends Block
Directive that puts an unrendered AST block in the context under the specified key, postponing rendering until the reference is used and rendered.- Version:
- $Id: Define.java 686842 2008-08-18 18:29:31Z nbubna $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.velocity.runtime.directive.Block
Block.Reference
-
-
Constructor Summary
Constructors Constructor Description Define()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Return name of this directive.void
init(RuntimeServices rs, InternalContextAdapter context, Node node)
simple init - get the keyboolean
render(InternalContextAdapter context, java.io.Writer writer, Node node)
directive.render() simply makes an instance of the Block inner class and places it into the context as indicated.-
Methods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, getScopeName, getTemplateName, isScopeProvided, makeScope, postRender, preRender, setLocation, setLocation
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Return name of this directive.
-
init
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
simple init - get the key- Overrides:
init
in classBlock
- Throws:
TemplateInitException
-
render
public boolean render(InternalContextAdapter context, java.io.Writer writer, Node node)
directive.render() simply makes an instance of the Block inner class and places it into the context as indicated.
-
-