类 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
Property
s, 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.Type
s 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
Converter
implementation
- 版本:
- $Id: Data.java 511959 2007-02-26 19:24:39Z nbubna $
- 作者:
- Nathan Bubna
-
嵌套类概要
嵌套类修饰符和类型类说明protected static class
protected static class
protected static class
protected static enum
Delineates the standard, known types and their associated target classes (setTargetClass(java.lang.Class)
and converters (setConverter(java.lang.Class)
). -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明int
protected Object
private List
convertList
(Object val) private Object
convertValue
(Object value) void
convertWith
(Converter converter) This is a convenience method for those doing configuration in java.boolean
Converter
getKey()
getType()
getValue()
int
hashCode()
void
This doesn't take aClass
parameter because this class was not created for all-java configuration.void
setClassname
(String classname) void
setConverter
(Class clazz) void
setConverter
(String classname) void
void
setTargetClass
(Class clazz) void
protected void
void
toString()
void
validate()
-
字段详细资料
-
DEFAULT_TYPE
-
key
-
typeValue
-
value
-
isList
private boolean isList -
target
-
converter
private Converter converter
-
-
构造器详细资料
-
Data
public Data()
-
-
方法详细资料
-
setKey
-
setValue
-
setClassname
-
setClass
This doesn't take aClass
parameter because this class was not created for all-java configuration. -
setType
-
setType
-
setTargetClass
-
setConverter
-
setConverter
-
convertWith
public void convertWith(Converter converter) This is a convenience method for those doing configuration in java. It cannot be named setConverter(), or else it would confuse BeanUtils. -
getKey
-
getType
-
getValue
-
getTargetClass
-
getConverter
public Converter getConverter() -
getConvertedValue
-
validate
public void validate() -
compareTo
- 指定者:
compareTo
在接口中Comparable<Data>
-
hashCode
public int hashCode() -
equals
-
toString
-
convert
-
convertValue
-
convertList
-