org.apache.commons.beanutils.PropertyUtils

http://commons.apache.org/beanutils/api/org/apache/commons/beanutils/PropertyUtils.html

コンストラク

コンストラク 概要(日本語訳) 概要(英語原文)
PropertyUtils()    

メソッド(すべてstatic)

プロパティが読み込み・書き込み可能か確認する
メソッド 概要(日本語訳) 概要(英語原文)
boolean isReadable(Object bean, String name) 指定されたプロパティの名前が指定されたbeanの読み取り可能なプロパティである場合trueを返す。そうでなければfalseを返す。 Return true if the specified property name identifies a readable property on the specified bean; otherwise, return false.
boolean isWriteable(Object bean, String name) 指定されたプロパティの名前が指定されたbeanの書き込み可能なプロパティである場合trueを返す。そうでなければfalseを返す。 Return true if the specified property name identifies a writeable property on the specified bean; otherwise, return false.
プロパティの値を取得する。
メソッド 概要(日本語訳) 概要(英語原文)
Object getProperty(Object bean, String name) 指定されたbeanの任意のプロパティ参照フォーマットの名前のプロパティの値を型変換せずに返す。 Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
Object getSimpleProperty(Object bean, String name) 指定されたbeanの指定された単純なポロパティの値を型変換せずに返す。 Return the value of the specified simple property of the specified bean, with no type conversions.
Object getIndexedProperty(Object bean, String name) 指定されたbeanのインデックス付き指定されたプロパティの値を型変換をせずに返す。 Return the value of the specified indexed property of the specified bean, with no type conversions.
Object getIndexedProperty(Object bean, String name, int index) 指定されたbeanの指定されたインデックス付きプロパティの値を型変換をせずに返す。 Return the value of the specified indexed property of the specified bean, with no type conversions.
Object getMappedProperty(Object bean, String name) 指定されたbeanの指定されたマップされたプロパティの値を型変換をせずに返す。 Return the value of the specified mapped property of the specified bean, with no type conversions.
Object getMappedProperty(Object bean, String name, String key) 指定されたbeanの指定されたマップされたプロパティの値を型変換をせずに返す。 Return the value of the specified mapped property of the specified bean, with no type conversions.
Object getNestedProperty(Object bean, String name) 指定されたbeanの指定された(ネスト可能な)名前のプロパティの値を型変換せずに返す。 Return the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
プロパティに値を設定する
メソッド 概要(日本語訳) 概要(英語原文)
void setProperty(Object bean, String name, Object value) 指定されたbeanの指定された任意のプロパティ参照フォーマットの名前のプロパティに型変換せずに値を設定する。 Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
void setSimpleProperty(Object bean, String name, Object value) 指定されたbeanの指定された単純なプロパティに型変換せずに値を設定する。 Set the value of the specified simple property of the specified bean, with no type conversions.
void setIndexedProperty(Object bean, String name, int index, Object value) 指定されたbeanの指定されたインデックス付きプロパティに型変換せずに値を設定する。 Sets the value of the specified indexed property of the specified bean, with no type conversions.
void setIndexedProperty(Object bean, String name, Object value) 指定されたbeanの指定されたインデックス付きプロパティに型変換せずに値を設定する。 Sets the value of the specified indexed property of the specified bean, with no type conversions.
void setMappedProperty(Object bean, String name, Object value) 指定されたbeanの指定されたマップされたプロパティに型変換せずに値を設定する。 Sets the value of the specified mapped property of the specified bean, with no type conversions.
void setMappedProperty(Object bean, String name, String key, Object value) 指定されたbeanの指定されたマップされたプロパティに型変換せずに値を設定する。 Sets the value of the specified mapped property of the specified bean, with no type conversions.
void setNestedProperty(Object bean, String name, Object value) 指定されたbeanの指定された(ネスト可能な)名前のプロパティに型変換せずに値を設定する。 Sets the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
すべてのプロパティのセットを取得する。
メソッド 概要(日本語訳) 概要(英語原文)
Map describe(Object bean) 指定されたbeanが読み取りメソッドを提供するプロパティをすべて含むセットを返す。 Return the entire set of properties for which the specified bean provides a read method.
すべてのプロパティをコピーする。
メソッド 概要(日本語訳) 概要(英語原文)
void copyProperties(Object dest, Object orig) プロパティ名が一致するすべてのプロパティの値を「起点」のbeanから「終点」のbeanへコピーする(実際のgetterとsetterのメソッドがBeanInfoクラスによりカスタマイズされていた場合も)。 Copy property values from the "origin" bean to the "destination" bean for all cases where the property names are the same (even though the actual getter and setter methods might have been customized via BeanInfo classes).
読み込み・書き込みのためのメソッドを取得する
メソッド 概要(日本語訳) 概要(英語原文)
Method getReadMethod(PropertyDescriptor descriptor) もしあればプロパティのアクセス可能のgetterメソッドを返す。なければnullを返す。 Return an accessible property getter method for this property, if there is one; otherwise return null.
Method getWriteMethod(PropertyDescriptor descriptor) もしあればプロパティのアクセス可能なsetterメソッドを返す。なければnullを返す。 Return an accessible property setter method for this property, if there is one; otherwise return null.
プロパティエディタクラスを取得する。
メソッド 概要(日本語訳) 概要(英語原文)
Class getPropertyEditorClass(Object bean, String name) (もしあれば)プロパティに登録されたプロパティエディタクラスを表すJavaクラスを返す。 Return the Java Class repesenting the property editor class that has been registered for this property (if any).
プロパティの型を取得する。
メソッド 概要(日本語訳) 概要(英語原文)
Class getPropertyType(Object bean, String name) 指定されたプロパティの型を表すJavaクラスを返す。もし指定されたbeanにそのようなプロパティがなければnullを返す。 Return the Java Class representing the property type of the specified property, or null if there is no such property for the specified bean.
プロパティディスクリプタを取得する。
メソッド 概要(日本語訳) 概要(英語原文)
PropertyDescriptor getPropertyDescriptor(Object bean, String name) 指定されたbeanの指定されたプロパティのプロパティディスクリプタ、あるいは、ディスクリプタがない場合はnullを返す。 Retrieve the property descriptor for the specified property of the specified bean, or return null if there is no such descriptor.
PropertyDescriptor[] getPropertyDescriptors(Class beanClass) 指定されたクラスのプロパティを取得する。beanのクラスは初回使用時ににイントロスぺクションしてキャッシュされる。 Retrieve the property descriptors for the specified class, introspecting and caching them the first time a particular bean class is encountered.
PropertyDescriptor[] getPropertyDescriptors(Object bean) 指定されたクラスのプロパティを取得する。beanのクラスは初回使用時ににイントロスぺクションしてキャッシュされる。 Retrieve the property descriptors for the specified bean, introspecting and caching them the first time a particular bean class is encountered.
プロパティディスクリプタの情報を削除する。
メソッド 概要(日本語訳) 概要(英語原文)
void clearDescriptors() すべてのクラスローダによりロードされたすべてのクラスについてキャッシュされたプロパティディスクリプタの情報をすべて削除する。 Clear any cached property descriptors information for all classes loaded by any class loaders.