全パッケージ  クラス階層  このパッケージ  前項目  次項目  インデックス

クラス java.beans.IndexedPropertyDescriptor

java.lang.Object
   |
   +----java.beans.FeatureDescriptor
           |
           +----java.beans.PropertyDescriptor
                   |
                   +----java.beans.IndexedPropertyDescriptor

public class IndexedPropertyDescriptor
extends PropertyDescriptor
IndexedPropertyDescriptor は、配列のように機能し、配列の特定要素にアクセスするための添字付き読取り/書込み (またはその両方) メソッドを持つプロパティを記述します。

添字付きプロパティは、単純な添字のない読取りや書込みメソッドも提供できます。このようなメソッドは (存在する場合)、添字付き読取りメソッドが返した型の配列を読み書きします。


Constructor Index

 o IndexedPropertyDescriptor(String, Class)
この構築子は、添字付きアクセスおよび配列アクセスの両方について、getFoo と setFoo アクセス用メソッドを用いて標準 Java 規則に従うプロパティのための IndexedPropertyDescriptor を構築する。
 o IndexedPropertyDescriptor(String, Class, String, String, String, String)
この構築子は、単純なプロパティ名および添字付き/添字なしの両方について、プロパティを読み書きするメソッド名を引数に取る。
 o IndexedPropertyDescriptor(String, Method, Method, Method, Method)
この構築子は、単純なプロパティ名およびプロパティを読み書きする Method オブジェクトを引数に取る。

Method Index

 o getIndexedPropertyType()
 o getIndexedReadMethod()
 o getIndexedWriteMethod()

Constructors

 o IndexedPropertyDescriptor
  public IndexedPropertyDescriptor(String propertyName,
                                   Class beanClass) throws IntrospectionException
この構築子は、添字付きアクセスおよび配列アクセスの両方について、getFoo と setFoo アクセス用メソッドを用いて標準 Java 規則に従うプロパティのための IndexedPropertyDescriptor を構築します。

つまり、引数名が "fred" の場合、添字付きの読取りメソッド "getFred" と 添字のない (配列) 読取りメソッド "getFred"、添字付きの書込みメソッド "setFred" と添字のない書込みメソッド "setFred" があると仮定します。

パラメータ:
propertyName - プロパティのプログラム名
beanClass - ターゲット bean の Class オブジェクト
例外: IntrospectionException
内部検査中に例外が発生した場合
 o IndexedPropertyDescriptor
  public IndexedPropertyDescriptor(String propertyName,
                                   Class beanClass,
                                   String getterName,
                                   String setterName,
                                   String indexedGetterName,
                                   String indexedSetterName) throws IntrospectionException
この構築子は、単純なプロパティ名および添字付き/添字なしの両方について、プロパティを読み書きするメソッド名を引数に取ります。

パラメータ:
propertyName - プロパティのプログラム名
beanClass - ターゲット bean の Class オブジェクト
getterName - プロパティ値を配列として読み取るために使うメソッドの名前。プロパティが書込み専用または添字付きの必要がある場合は、null になる。
setterName - プロパティ値を配列として書き込むために使うメソッドの名前。プロパティが読取り専用または添字付きの必要がある場合は、null になる。
indexedGetterName - 添字付きプロパティ値を読み取るために使うメソッドの名前。プロパティが書込み専用の場合は、null になる。
indexedSetterName - 添字付きプロパティ値を書き込むために使うメソッドの名前。プロパティが読取り専用の場合は、null になる。
例外: IntrospectionException
内部検査中に例外が発生した場合
 o IndexedPropertyDescriptor
  public IndexedPropertyDescriptor(String propertyName,
                                   Method getter,
                                   Method setter,
                                   Method indexedGetter,
                                   Method indexedSetter) throws IntrospectionException
この構築子は、単純なプロパティ名およびプロパティを読み書きする Method オブジェクトを引数に取ります。

パラメータ:
propertyName - プロパティのプログラム名
getter - プロパティ値を配列として読み取るために使うメソッド。プロパティが書込み専用または添字付きの必要がある場合は、null になる。
setter - プロパティ値を配列として書き込むために使うメソッド。プロパティが読取り専用または添字付きの必要がある場合は、null になる。
indexedGetter - 添字付きプロパティ値を読み取るために使うメソッド。プロパティが書込み専用の場合は、null になる。
indexedSetter - 添字付きプロパティ値を書き込むために使うメソッド。プロパティが読取り専用の場合は、null になる。
例外: IntrospectionException
内部検査中に例外が発生した場合

Methods

 o getIndexedReadMethod
  public Method getIndexedReadMethod()
返り値:
添字付きプロパティ値の読取りで使うメソッド。プロパティが添字付きでなかったり書込み専用の場合は、null を返す。
 o getIndexedWriteMethod
  public Method getIndexedWriteMethod()
返り値:
添字付きプロパティ値の書込みで使うメソッド。プロパティが添字付きでなかったり読取り専用の場合は、null を返す。
 o getIndexedPropertyType
  public Class getIndexedPropertyType()
返り値:
添字付きプロパティ型の Java Class。この Class は "int" などのプリミティブな Java 型を記述する場合もあることに注意する。

これは、indexedReadMethod が返す型です。


全パッケージ  クラス階層  このパッケージ  前項目  次項目  インデックス