|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造函数 | 方法 | 详细信息: 字段 | 构造函数 | 方法 | |||||||||
java.lang.Objecttot.xml.AbstractConfiguration
tot.xml.BaseConfiguration
tot.xml.BasePathConfiguration
tot.xml.XMLConfiguration
tot.xml.DOM4JConfiguration
public class DOM4JConfiguration
Reads a XML configuration file.
To retrieve the value of an attribute of an element, use
X.Y.Z[@attribute]. The '@' symbol was chosen for
consistency with XPath.
Setting property values will NOT automatically persist
changes to disk, unless autoSave=true.
| 字段摘要 |
|---|
| 从类 tot.xml.AbstractConfiguration 继承的字段 |
|---|
defaults, END_TOKEN, START_TOKEN |
| 构造函数摘要 | |
|---|---|
DOM4JConfiguration()
Empty construtor. |
|
DOM4JConfiguration(java.io.File file)
Attempts to load the XML file. |
|
DOM4JConfiguration(java.lang.String resource)
Attempts to load the XML file as a resource from the classpath. |
|
| 方法摘要 | |
|---|---|
void |
addProperty(java.lang.String name,
java.lang.Object value)
Calls super method, and also ensures the underlying Document is modified so changes are persisted when saved. |
void |
clearProperty(java.lang.String name)
Calls super method, and also ensures the underlying Document is modified so changes are persisted when saved. |
java.io.File |
getFile()
Returns the file. |
java.lang.String |
getFileName()
Returns the fileName. |
void |
load()
|
void |
save()
|
void |
setAutoSave(boolean autoSave)
If true, changes are automatically persisted. |
void |
setFile(java.io.File file)
Sets the file. |
void |
setFileName(java.lang.String fileName)
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Calls super method, and also ensures the underlying Document is modified so changes are persisted when saved. |
| 从类 tot.xml.BasePathConfiguration 继承的方法 |
|---|
getBasePath, setBasePath |
| 从类 tot.xml.BaseConfiguration 继承的方法 |
|---|
addPropertyDirect, containsKey, getKeys, getPropertyDirect, isEmpty |
| 从类 tot.xml.AbstractConfiguration 继承的方法 |
|---|
getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getVector, getVector, interpolate, interpolateHelper, processString, subset, testBoolean |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造函数详细信息 |
|---|
public DOM4JConfiguration()
public DOM4JConfiguration(java.lang.String resource)
throws java.lang.Exception
resource - Name of the resource
java.lang.Exception - If error reading data source.DOM4JConfiguration(File)
public DOM4JConfiguration(java.io.File file)
throws java.lang.Exception
file - File object representing the XML file.
java.lang.Exception - If error reading data source.| 方法详细信息 |
|---|
public void load()
throws java.lang.Exception
java.lang.Exception
public void addProperty(java.lang.String name,
java.lang.Object value)
Document is modified so changes are persisted when saved.
Configuration 中的 addPropertyAbstractConfiguration 中的 addPropertyname - value -
public void setProperty(java.lang.String name,
java.lang.Object value)
Document is modified so changes are persisted when saved.
Configuration 中的 setPropertyAbstractConfiguration 中的 setPropertyname - value - public void clearProperty(java.lang.String name)
Document is modified so changes are persisted when saved.
Configuration 中的 clearPropertyBaseConfiguration 中的 clearPropertyname - The name of the property to clear.public void setAutoSave(boolean autoSave)
autoSave -
public void save()
throws java.io.IOException
java.io.IOExceptionpublic java.io.File getFile()
public void setFile(java.io.File file)
file - The file to setpublic void setFileName(java.lang.String fileName)
public java.lang.String getFileName()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造函数 | 方法 | 详细信息: 字段 | 构造函数 | 方法 | |||||||||