类 Data
java.lang.Object
org.apache.velocity.tools.config.Data
- 所有已实现的接口:
Comparable<Data>
- 直接已知子类:
Property
This class represents configured data. If added to a
FactoryConfiguration, its values will be made
available in the application-scoped toolboxes
produced by any ToolboxFactory configured using
that configuration.
This class also implements all the functionality of
Propertys, which may added to any
Configuration subclass, including
ToolConfiguration, ToolboxConfiguration,
and FactoryConfiguration. In other words,
anything you can do in a Data configuration, you
can do with a Property.
Some features supported here are:
- built in
Data.Types for strings, booleans, numbers, fields and lists thereof - auto-conversion of numbers, booleans and fields in data with no explicit type
- support for any Commons-BeanUtils
Converterimplementation
- 版本:
- $Id: Data.java 511959 2007-02-26 19:24:39Z nbubna $
- 作者:
- Nathan Bubna
-
嵌套类概要
嵌套类修饰符和类型类说明protected static classprotected static classprotected static classprotected static enumDelineates the standard, known types and their associated target classes (setTargetClass(java.lang.Class)and converters (setConverter(java.lang.Class)). -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明intprotected ObjectvoidconvertWith(org.apache.commons.beanutils.Converter converter) This is a convenience method for those doing configuration in java.booleanorg.apache.commons.beanutils.ConvertergetKey()getType()getValue()inthashCode()voidThis doesn't take aClassparameter because this class was not created for all-java configuration.voidsetClassname(String classname) voidsetConverter(Class clazz) voidsetConverter(String classname) voidvoidsetTargetClass(Class clazz) voidprotected voidvoidtoString()voidvalidate()
-
字段详细资料
-
DEFAULT_TYPE
-
-
构造器详细资料
-
Data
public Data()
-
-
方法详细资料
-
setKey
-
setValue
-
setClassname
-
setClass
This doesn't take aClassparameter because this class was not created for all-java configuration.- 参数:
classname- class name
-
setType
-
setType
-
setTargetClass
-
setConverter
-
setConverter
-
convertWith
public void convertWith(org.apache.commons.beanutils.Converter converter) This is a convenience method for those doing configuration in java. It cannot be named setConverter(), or else it would confuse BeanUtils.- 参数:
converter- value converter
-
getKey
-
getType
-
getValue
-
getTargetClass
-
getConverter
public org.apache.commons.beanutils.Converter getConverter() -
getConvertedValue
-
validate
public void validate() -
compareTo
- 指定者:
compareTo在接口中Comparable<Data>
-
hashCode
public int hashCode() -
equals
-
toString
-
convert
-