|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.tools.view.ViewToolInfo
ToolInfo implementation for view tools. New instances
are returned for every call to getInstance(obj), and tools
that implement ViewTool
are initialized with the
given object before being returned.
Field Summary | |
private java.lang.Class |
clazz
|
private boolean |
configurable
|
private boolean |
initializable
|
private java.lang.String |
key
|
protected static org.apache.commons.logging.Log |
LOG
|
private java.util.Map |
parameters
|
Constructor Summary | |
ViewToolInfo()
|
Method Summary | |
protected java.lang.Class |
getApplicationClass(java.lang.String name)
Return the Class object for the specified fully qualified
class name, from this web application's class loader. |
java.lang.String |
getClassname()
|
java.lang.Object |
getInstance(java.lang.Object initData)
Returns a new instance of the tool. |
java.lang.String |
getKey()
Accessors |
java.util.Map |
getParameters()
Get parameters for this tool. |
void |
setClassname(java.lang.String classname)
If an instance of the tool cannot be created from the classname passed to this method, it will throw an exception. |
void |
setKey(java.lang.String key)
Mutators |
void |
setParameter(java.lang.String name,
java.lang.String value)
Set/add new parameter for this tool. |
void |
setParameters(java.util.Map parameters)
Set parameter map for this tool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.commons.logging.Log LOG
private java.lang.String key
private java.lang.Class clazz
private java.util.Map parameters
private boolean initializable
private boolean configurable
Constructor Detail |
public ViewToolInfo()
Method Detail |
protected java.lang.Class getApplicationClass(java.lang.String name) throws java.lang.ClassNotFoundException
Class
object for the specified fully qualified
class name, from this web application's class loader. If no
class loader is set for the current thread, then the class loader
that loaded this class will be used.
name
- Fully qualified class name to be loaded
java.lang.ClassNotFoundException
- if the class cannot be foundpublic void setKey(java.lang.String key)
public void setClassname(java.lang.String classname) throws java.lang.Exception
classname
- the fully qualified java.lang.Class name of the tool
java.lang.Exception
public void setParameters(java.util.Map parameters)
public void setParameter(java.lang.String name, java.lang.String value)
public java.lang.String getKey()
getKey
in interface ToolInfo
public java.lang.String getClassname()
getClassname
in interface ToolInfo
public java.util.Map getParameters()
public java.lang.Object getInstance(java.lang.Object initData)
ViewTool
, the new instance
will be initialized using the given data.
getInstance
in interface ToolInfo
initData
- an object that may be used to initialize the instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |