public class PropertiesConfiguration extends AbstractConfiguration
修飾子とタイプ | フィールドと説明 |
---|---|
protected String |
current |
protected File |
file |
protected Properties |
properties |
コンストラクタと説明 |
---|
PropertiesConfiguration(File file) |
PropertiesConfiguration(String path) |
修飾子とタイプ | メソッドと説明 |
---|---|
String |
get()
自身のノードが表現する値(内容)を返します。
|
String |
get(String key)
現在着目しているノードの、指定された子要素の内容を文字列として返します。
|
IConfiguration |
getAttributes()
現在着目しているノードの属性群を表すIConfigurationを返します。
|
IConfiguration |
getChild(String name)
現在着目している要素の子要素の内、指定名称を持つ最初の子要素を
表すIConfigurationを返します。
|
String |
getName()
現在着目しているノード名を返します。
|
IConfiguration |
getParent()
親コンテキストを表すIConfigurationを返します。
|
addChild, addChild, addChild, get, getBoolean, getBoolean, getChild, getChilds, getChilds, getFloat, getFloat, getInteger, getInteger, listChild, listChild, set, setAttribute
protected File file
protected Properties properties
protected String current
public PropertiesConfiguration(String path) throws IOException
IOException
public PropertiesConfiguration(File file) throws IOException
IOException
public IConfiguration getParent()
IConfiguration
getParent
インタフェース内 IConfiguration
getParent
クラス内 AbstractConfiguration
public IConfiguration getChild(String name)
IConfiguration
getChild
インタフェース内 IConfiguration
getChild
クラス内 AbstractConfiguration
name
- 子要素名public IConfiguration getAttributes()
IConfiguration
XMLにおいて<foo name=value />要素を表すIConfigurationオブジェクト fooが存在する時、属性値の取得は
foo.getAttributes().get("name")
の様になります。
getAttributes
インタフェース内 IConfiguration
getAttributes
クラス内 AbstractConfiguration
public String getName()
IConfiguration
getName
インタフェース内 IConfiguration
getName
クラス内 AbstractConfiguration
public String get() throws UnspecifiedPropertyException
IConfiguration
public String get(String key) throws UnspecifiedPropertyException
IConfiguration
key
- 子要素名UnspecifiedPropertyException
- keyに対応する値が取得できなかった(子要素または内容がない)Copyright © 2021 S.D.S Co.,Ltd.. All rights reserved.