Java プラットフォーム 1.2

java.beans
クラス IndexedPropertyDescriptor

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

public class IndexedPropertyDescriptor
extends PropertyDescriptor

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

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


コンストラクタの概要
IndexedPropertyDescriptor(String propertyName, Class beanClass)
          添字付きアクセスおよび配列アクセスの両方について、getFoo と setFoo アクセス用メソッドを使って、標準 Java 規則に従うプロパティのための IndexedPropertyDescriptor を構築します。
IndexedPropertyDescriptor(String propertyName, Class beanClass, String getterName, String setterName, String indexedGetterName, String indexedSetterName)
          単純なプロパティ名、およびプロパティを読み書きするメソッド (添字付き/添字なしの両方) の名前を引数に取ります。
IndexedPropertyDescriptor(String propertyName, Method getter, Method setter, Method indexedGetter, Method indexedSetter)
          単純なプロパティ名、およびプロパティを読み書きする Method オブジェクトを引数に取ります。
 
メソッドの概要
 Class getIndexedPropertyType()
          添字付きプロパティ型の Class オブジェクトを取得します。
 Method getIndexedReadMethod()
          添字付きプロパティ値の読み込みに使うメソッドを取得します。
 Method getIndexedWriteMethod()
          添字付きプロパティ値の書き込みに使うメソッドを取得します。
 void setIndexedReadMethod(Method getter)
          添字付きプロパティ値の読み込みに使うメソッドを設定します。
 void setIndexedWriteMethod(Method setter)
          添字付きプロパティ値の書き込みに使うメソッドを設定します。
 
クラス java.beans.PropertyDescriptor から継承したメソッド
getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
 
クラス java.beans.FeatureDescriptor から継承したメソッド
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

IndexedPropertyDescriptor

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

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

パラメータ:
propertyName - プロパティのプログラム名
beanClass - ターゲット bean の Class オブジェクト
例外:
IntrospectionException - 内部検査中に例外が発生した場合

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 - 内部検査中に例外が発生した場合

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 - 内部検査中に例外が発生した場合
メソッドの詳細

getIndexedReadMethod

public Method getIndexedReadMethod()
添字付きプロパティ値の読み込みに使うメソッドを取得します。
戻り値:
添字付きプロパティ値の読み込みに使うメソッド。プロパティが添字付きでないか、または書き込み専用の場合は null

setIndexedReadMethod

public void setIndexedReadMethod(Method getter)
                          throws IntrospectionException
添字付きプロパティ値の読み込みに使うメソッドを設定します。
パラメータ:
getter - 新しい添字付き読み込み用メソッド

getIndexedWriteMethod

public Method getIndexedWriteMethod()
添字付きプロパティ値の書き込みに使うメソッドを取得します。
戻り値:
添字付きプロパティ値の書き込みに使うメソッド。プロパティが添字付きでないか、読み込み専用の場合は null

setIndexedWriteMethod

public void setIndexedWriteMethod(Method setter)
                           throws IntrospectionException
添字付きプロパティ値の書き込みに使うメソッドを設定します。
パラメータ:
getter - 新しい添字付き書き込み用メソッド

getIndexedPropertyType

public Class getIndexedPropertyType()
添字付きプロパティ型の Class オブジェクトを取得します。これは、indexedReadMethod が返す型になります。
戻り値:
添字付きプロパティ型の Java クラス。この Class は int などのプリミティブな Java 型を記述する場合もあることに注意する

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.