public final class PropertyFactoryByLinkedHashMap
extends java.lang.Object
[MultipleCombination MemberA ValueA MemberB ValueB ... MemberX ValueX , MemberA ValueAA MemberB ValueBB ... MemberX ValueXX ]
例
System.out.println(str); の結果が (root_property root_property_key1 root_property_value1 "root property key2" "root property value2" (child1 child1_key1 child1_value1 (child2 child1_key2 child1_value2 ) ) ) のstrで入れ子プパティを作成 System.out.println(PropertyFactory.getProperties(str)); の結果は {root_property={child1={child1_key1=child1_value1, child2={child1_key2=child1_value2}}, root_property_key1=root_property_value1, root property key=root property value2}} となる入れ子構造のプロパティを文字列変換する。
コンストラクタと説明 |
---|
PropertyFactoryByLinkedHashMap() |
修飾子とタイプ | メソッドと説明 |
---|---|
protected static java.lang.String |
getFormatString() |
static java.util.Properties |
getProperties(java.lang.String str)
入れ子プロパティを作成する
|
static java.util.Properties |
getProperties(java.lang.String path,
java.lang.String encoding) |
static java.util.Properties |
getProperties(java.net.URL url,
java.lang.String encoding)
引数で与えられたURLオブジェクトからプロパティファイルに接続して
読み込み、プロパティオブジェクトを取得する。
|
static void |
propertyDsp(java.util.Properties prm) |
static java.lang.String |
removeDoubleQuote(java.lang.String str) |
static java.lang.String |
toString(java.util.Map prm)
入れ子プロパティを作成する
|
public static java.util.Properties getProperties(java.lang.String path, java.lang.String encoding) throws PropertyFactoryException
public static java.util.Properties getProperties(java.net.URL url, java.lang.String encoding) throws PropertyFactoryException
url
- 読み込み対象に接続するためのURLオブジェクトencoding
- プロパティファイルの文字コード指定。デフォルトエンコーディングを指定するならnullPropertyFactoryException
- プロパティの読み込み失敗public static java.util.Properties getProperties(java.lang.String str) throws PropertyFactoryException
str
- 入れ子構造の文字列PropertyFactoryException
- プロパティ構造が正しくない場合public static java.lang.String toString(java.util.Map prm)
prm
- 入れ子構造のプロパティpublic static void propertyDsp(java.util.Properties prm)
protected static java.lang.String getFormatString()
public static java.lang.String removeDoubleQuote(java.lang.String str)