org.apache.velocity.runtime.directive
Class Directive
java.lang.Object
|
+--org.apache.velocity.runtime.directive.Directive
- All Implemented Interfaces:
- java.lang.Cloneable, DirectiveConstants
- Direct Known Subclasses:
- Foreach, Include, Literal, Macro, Parse, VelocimacroProxy
- public abstract class Directive
- extends java.lang.Object
- implements DirectiveConstants, java.lang.Cloneable
Base class for all directives used in Velocity.
- Version:
- $Id: Directive.java,v 1.17 2001/10/22 03:53:24 jon Exp $
- Author:
- Jason van Zyl
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
line
private int line
column
private int column
rsvc
protected RuntimeServices rsvc
Directive
public Directive()
getName
public abstract java.lang.String getName()
- Return the name of this directive
getType
public abstract int getType()
- Get the directive type BLOCK/LINE
setLocation
public void setLocation(int line,
int column)
- Allows the template location to be set
getLine
public int getLine()
- for log msg purposes
getColumn
public int getColumn()
- for log msg purposes
init
public void init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
throws java.lang.Exception
- How this directive is to be initialized.
render
public abstract boolean render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
throws java.io.IOException,
ResourceNotFoundException,
ParseErrorException,
MethodInvocationException
- How this directive is to be rendered
Copyright © 2003 Apache Software Foundation. All Rights Reserved.