org.apache.velocity.tools.config
Class ToolConfiguration
java.lang.Object
org.apache.velocity.tools.config.Configuration
org.apache.velocity.tools.config.ToolConfiguration
public class ToolConfiguration
- extends Configuration
- Version:
- $Id: ToolConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
- Author:
- Nathan Bubna
Methods inherited from class org.apache.velocity.tools.config.Configuration |
addConfiguration, addProperty, appendProperties, getConvertableProperties, getProperties, getSimpleProperties, hasProperties, removeProperty, removeProperty, setProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
key
private java.lang.String key
classname
private java.lang.String classname
restrictTo
private java.lang.String restrictTo
status
private ToolConfiguration.Status status
problem
private java.lang.Throwable problem
ToolConfiguration
public ToolConfiguration()
setKey
public void setKey(java.lang.String key)
setClass
public void setClass(java.lang.Class clazz)
- This doesn't take a
Class
parameter because
this class was not created for all-java configuration.
setClassname
public void setClassname(java.lang.String classname)
setRestrictTo
public void setRestrictTo(java.lang.String path)
getKey
public java.lang.String getKey()
- Returns the key set for this tool, if not
null
. Otherwise,
looks for a DefaultKey
annotation on the tool class. Finally,
if there is no default key, the Class.getSimpleName()
is used
as the key. This should only return null
if there is no key
and no classname set for this tool.
getClassname
public java.lang.String getClassname()
getToolClass
public java.lang.Class getToolClass()
getInvalidScopes
public java.lang.String[] getInvalidScopes()
getValidScopes
public java.lang.String[] getValidScopes()
getStatus
private final ToolConfiguration.Status getStatus()
digForDependencies
private void digForDependencies(java.lang.Class clazz)
getRestrictTo
public java.lang.String getRestrictTo()
createInfo
public ToolInfo createInfo()
getError
private final java.lang.String getError(ToolConfiguration.Status status)
validate
public void validate()
- Overrides:
validate
in class Configuration
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright (c) 2003-2007 Apache Software Foundation