org.apache.velocity.runtime.directive

Class Directive

public abstract class Directive extends Object implements DirectiveConstants, Cloneable

Base class for all directives used in Velocity.

Version: $Id: Directive.java,v 1.18.4.1 2004/03/03 23:22:55 geirm Exp $

Author: Jason van Zyl

Field Summary
intcolumn
intline
protected RuntimeServicesrsvc
Method Summary
intgetColumn()
for log msg purposes
intgetLine()
for log msg purposes
abstract StringgetName()
Return the name of this directive
abstract intgetType()
Get the directive type BLOCK/LINE
voidinit(RuntimeServices rs, InternalContextAdapter context, Node node)
How this directive is to be initialized.
abstract booleanrender(InternalContextAdapter context, Writer writer, Node node)
How this directive is to be rendered
voidsetLocation(int line, int column)
Allows the template location to be set

Field Detail

column

private int column

line

private int line

rsvc

protected RuntimeServices rsvc

Method Detail

getColumn

public int getColumn()
for log msg purposes

getLine

public int getLine()
for log msg purposes

getName

public abstract String getName()
Return the name of this directive

getType

public abstract int getType()
Get the directive type BLOCK/LINE

init

public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
How this directive is to be initialized.

render

public abstract boolean render(InternalContextAdapter context, Writer writer, Node node)
How this directive is to be rendered

setLocation

public void setLocation(int line, int column)
Allows the template location to be set
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.