类 ToolConfiguration
java.lang.Object
org.apache.velocity.tools.config.Configuration
org.apache.velocity.tools.config.ToolConfiguration
- 所有已实现的接口:
Comparable<Configuration>
This class handles configuration info for tools, including their key,
classname, path restriction, and properties. It also does fairly
aggresive validation.
Once configuration is complete, a ToolInfo instance can be created by calling
createInfo().
Most users will not find themselves directly using the API of this class.
- 版本:
- $Id: ToolConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
- 作者:
- Nathan Bubna
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddConfiguration(Configuration config) intcompareTo(Configuration conf) booleanReturns the default key value for the set tool class.String[]getKey()Returns the key set for this tool.String[]inthashCode()void已过时。voidvoidsetClassname(String classname) voidsetFactory(Class factory) voidsetFactoryClassname(String factoryClassname) voidvoidsetRestrictTo(String path) voidsetSkipSetters(Boolean cfgOnly) toString()voidvalidate()从类继承的方法 org.apache.velocity.tools.config.Configuration
addProperty, appendProperties, getProperties, getProperty, getPropertyMap, hasProperties, removeProperty, removeProperty, setProperties, setProperty, setPropertyMap
-
构造器详细资料
-
ToolConfiguration
public ToolConfiguration()
-
-
方法详细资料
-
setKey
-
setClass
已过时。This method should be avoided, since considered unsafe by the security manager.- 参数:
clazz- the Class- 另请参阅:
-
setClass
-
setClassname
-
setFactory
-
setFactoryClassname
-
setRestrictTo
-
setSkipSetters
-
getKey
Returns the key set for this tool. If no key has been explicitly set, this will return the result ofgetDefaultKey().- 返回:
- tool key
-
getDefaultKey
Returns the default key value for the set tool class. First, this looks for aDefaultKeyannotation on the tool class. Then, if there is no default key annotation, theClass.getSimpleName()is transformed into the key by removing any 'Tool' suffix and lowercasing the first character. This will only returnnullif there is both no key and no classname set for this tool.- 返回:
- default tool key
-
getClassname
-
getFactoryClassname
-
getToolClass
-
getFactory
-
getInvalidScopes
-
getValidScopes
-
getRestrictTo
-
getSkipSetters
-
createInfo
-
addConfiguration
- 覆盖:
addConfiguration在类中Configuration
-
validate
public void validate()- 覆盖:
validate在类中Configuration
-
compareTo
- 指定者:
compareTo在接口中Comparable<Configuration>- 覆盖:
compareTo在类中Configuration
-
hashCode
public int hashCode()- 覆盖:
hashCode在类中Configuration
-
equals
- 覆盖:
equals在类中Configuration
-
toString
-