org.apache.velocity.tools.view
Interface ToolInfo

All Known Implementing Classes:
DataInfo, ViewToolInfo

public interface ToolInfo

Interface to simplify and abstract tool handling. Implementations of this class should hold both the context key for the tool and sufficient information to return an instance of the tool.

Version:
$Id: ToolInfo.html,v 1.7.2.1 2004/05/17 17:09:44 nbubna Exp $
Author:
Nathan Bubna

Method Summary
 java.lang.String getClassname()
           
 java.lang.Object getInstance(java.lang.Object initData)
          Returns an instance of the tool.
 java.lang.String getKey()
           
 

Method Detail

getKey

public java.lang.String getKey()
Returns:
the context key for the tool

getClassname

public java.lang.String getClassname()
Returns:
the fully qualified classname for the tool

getInstance

public java.lang.Object getInstance(java.lang.Object initData)
Returns an instance of the tool. Instances returned may be new on each call, pooled, or the be same instance every time depending on the implementation. The object passed to this method may be used to initialize or create the tool that is returned, or it may be null if no such data is required.

Parameters:
initData - an object that may be used to initialize the instance
Returns:
an instance of the tool


Copyright (c) 2003 Apache Software Foundation