org.apache.velocity.runtime.directive
abstract public class: Directive [javadoc |
source]
java.lang.Object
org.apache.velocity.runtime.directive.Directive
All Implemented Interfaces:
Cloneable, DirectiveConstants
Direct Known Subclasses:
Literal, Macro, Parse, InputBase, Include, VelocimacroProxy, Foreach
Base class for all directives used in Velocity.
- author:
< - a href="mailto:jvanzyl@apache.org">Jason van Zyl
- version:
$ - Id: Directive.java 471381 2006-11-05 08:56:58Z wglass $
| Field Summary |
|---|
| protected RuntimeServices | rsvc | |
| Method from org.apache.velocity.runtime.directive.Directive Detail: |
public int getColumn() {
return column;
}
|
public int getLine() {
return line;
}
|
abstract public String getName()
Return the name of this directive. |
abstract public int getType()
Get the directive type BLOCK/LINE. |
public void init(RuntimeServices rs,
InternalContextAdapter context,
Node node) throws TemplateInitException {
rsvc = rs;
// int i, k = node.jjtGetNumChildren();
//for (i = 0; i < k; i++)
// node.jjtGetChild(i).init(context, rs);
}
How this directive is to be initialized. |
abstract public boolean render(InternalContextAdapter context,
Writer writer,
Node node) throws MethodInvocationException, IOException, ResourceNotFoundException, ParseErrorException
How this directive is to be rendered |
public void setLocation(int line,
int column) {
this.line = line;
this.column = column;
}
Allows the template location to be set. |