org.apache.velocity.tools
Class OldToolInfo
java.lang.Object
org.apache.velocity.tools.ToolInfo
org.apache.velocity.tools.OldToolInfo
- All Implemented Interfaces:
- java.io.Serializable
public class OldToolInfo
- extends ToolInfo
Manages old tools which still use the deprecated init() method.
- Version:
- $Id: OldToolInfo.java 511959 2007-02-26 19:24:39Z nbubna $
- Author:
- Nathan Bubna
- See Also:
- Serialized Form
Constructor Summary |
OldToolInfo(java.lang.String key,
java.lang.Class clazz)
Creates a new instance using the minimum required info
necessary for a tool. |
Method Summary |
protected void |
configure(java.lang.Object tool,
java.util.Map<java.lang.String,java.lang.Object> configuration)
Actually performs configuration of the newly instantiated tool
using the combined final set of configuration properties. |
protected java.lang.reflect.Method |
getInit()
|
void |
setClass(java.lang.Class clazz)
Tries to create an instance of the specified Class, then looks for a
configure(Map) method. |
Methods inherited from class org.apache.velocity.tools.ToolInfo |
addProperties, combine, create, getClassname, getConfigure, getKey, getProperties, getProps, getToolClass, hasConfigure, hasPermission, invoke, isSkipSetters, newInstance, putProperty, restrictTo, setKey, setProperty, setSkipSetters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
INIT_METHOD_NAME
public static final java.lang.String INIT_METHOD_NAME
- See Also:
- Constant Field Values
init
private transient java.lang.reflect.Method init
OldToolInfo
public OldToolInfo(java.lang.String key,
java.lang.Class clazz)
- Creates a new instance using the minimum required info
necessary for a tool.
getInit
protected java.lang.reflect.Method getInit()
setClass
public void setClass(java.lang.Class clazz)
- Description copied from class:
ToolInfo
- Tries to create an instance of the specified Class, then looks for a
configure(Map) method.
- Overrides:
setClass
in class ToolInfo
- Parameters:
clazz
- the java.lang.Class of the tool
configure
protected void configure(java.lang.Object tool,
java.util.Map<java.lang.String,java.lang.Object> configuration)
- Description copied from class:
ToolInfo
- Actually performs configuration of the newly instantiated tool
using the combined final set of configuration properties. First,
if the class lacks the
SkipSetters
annotation, then any
specific setters matching the configuration keys are called, then
the general configure(Map) method (if any) is called.
- Overrides:
configure
in class ToolInfo
Copyright (c) 2003-2007 Apache Software Foundation