|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectshohaku.shoin.factory.AbstractResourceSetFactory
shohaku.shoin.factory.AbstractObjectResourceSetFactory
shohaku.shoin.factory.ConstantsProperties
指定されたクラスのパブリックな定数(public static final なフィールド)をプロパティセットとして生成するファクトリを提供します。
基となるオブジェクトがクラス型の場合はそのまま使用されます、以外の場合はそのオブジェクトのクラス型が使用されます。
例:
一般的なファイルの読み取りとコンポーネント取得の手順は以下の様に為ります。 ConstantsProperties factory = new ConstantsProperties(); factory.setSources(new Object[] { Integer.class }); ResourceSet resources = factory.getResourceSet(); Integer max = (Integer) resources.getObject("MAX_VALUE"); System.out.println("int の最大値=" + max); >>int の最大値=2147483647
コンストラクタの概要 | |
ConstantsProperties()
プロパティを初期値で初期化します。 |
メソッドの概要 | |
java.lang.String |
getPrefix()
全てのリソースに対する接頭辞を返却します。 |
ResourceSet |
getResourceSet()
リソース集合を生成し返却します。 |
java.lang.String[] |
getSourcesPrefix()
リソース単位での接頭辞の配列を返却します。 |
void |
setPrefix(java.lang.String prefix)
全てのリソースに対する接頭辞を格納します。 |
void |
setSourcesPrefix(java.lang.String[] prefixs)
リソース単位での接頭辞の配列を格納します。 |
クラス shohaku.shoin.factory.AbstractObjectResourceSetFactory から継承したメソッド |
getSources, setSources |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public ConstantsProperties()
メソッドの詳細 |
public ResourceSet getResourceSet() throws ResourceSetCreationException
ResourceSetFactory
の記述:
ResourceSetFactory
内の getResourceSet
ResourceSetCreationException
- リソース集合の生成に失敗した場合public java.lang.String getPrefix()
ResourceKeyPrefixSupport
の記述:
ResourceKeyPrefixSupport
内の getPrefix
public void setPrefix(java.lang.String prefix)
ResourceKeyPrefixSupport
の記述:
ResourceKeyPrefixSupport
内の setPrefix
prefix
- 全てのリソースに対する接頭辞public java.lang.String[] getSourcesPrefix()
ResourceKeyPrefixSupport
の記述:
ResourceKeyPrefixSupport
内の getSourcesPrefix
public void setSourcesPrefix(java.lang.String[] prefixs)
ResourceKeyPrefixSupport
の記述:
ResourceKeyPrefixSupport
内の setSourcesPrefix
prefixs
- リソース単位での接頭辞の配列
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |