org.seasar.framework.beans
インタフェース PropertyDesc

既知の実装クラスの一覧:
PropertyDescImpl

public interface PropertyDesc

プロパティを扱うためのインターフェースです。

作成者:
higa

メソッドの概要
 Object convertIfNeed(Object value)
          プロパティの型に応じて必要なら適切に変換します。
 Field getField()
          プロパティとして認識しているpublicフィールドを返します。
 String getPropertyName()
          プロパティ名を返します。
 Class getPropertyType()
          プロパティの型を返します。
 Method getReadMethod()
          getterメソッドを返します。
 Object getValue(Object target)
          プロパティの値を返します。
 Method getWriteMethod()
          setterメソッドを返します。
 boolean hasReadMethod()
          getterメソッドを持っているかどうか返します。
 boolean hasWriteMethod()
          setterメソッドを持っているかどうか返します。
 boolean isReadable()
          プロパティの値が取得できるかどうかを返します。
 boolean isWritable()
          プロパティの値が設定できるかどうかを返します。
 void setField(Field field)
          プロパティとして認識しているpublicフィールドを設定します。
 void setReadMethod(Method readMethod)
          getterメソッドを設定します。
 void setValue(Object target, Object value)
          プロパティに値を設定します。
 void setWriteMethod(Method writeMethod)
          setterメソッドを設定します。
 

メソッドの詳細

getPropertyName

public String getPropertyName()
プロパティ名を返します。

戻り値:
プロパティ名

getPropertyType

public Class getPropertyType()
プロパティの型を返します。

戻り値:
プロパティの型

getReadMethod

public Method getReadMethod()
getterメソッドを返します。

戻り値:
getterメソッド

setReadMethod

public void setReadMethod(Method readMethod)
getterメソッドを設定します。

パラメータ:
readMethod -

hasReadMethod

public boolean hasReadMethod()
getterメソッドを持っているかどうか返します。

戻り値:
getterメソッドを持っているかどうか

getWriteMethod

public Method getWriteMethod()
setterメソッドを返します。

戻り値:
setterメソッド

setWriteMethod

public void setWriteMethod(Method writeMethod)
setterメソッドを設定します。

パラメータ:
writeMethod -

hasWriteMethod

public boolean hasWriteMethod()
setterメソッドを持っているかどうか返します。

戻り値:
setterメソッドを持っているかどうか

isReadable

public boolean isReadable()
プロパティの値が取得できるかどうかを返します。

戻り値:
プロパティの値が取得できるかどうか

isWritable

public boolean isWritable()
プロパティの値が設定できるかどうかを返します。

戻り値:
プロパティの値が設定できるかどうか

getField

public Field getField()
プロパティとして認識しているpublicフィールドを返します。

戻り値:
プロパティとして認識しているpublicフィールド

setField

public void setField(Field field)
プロパティとして認識しているpublicフィールドを設定します。

パラメータ:
field -

getValue

public Object getValue(Object target)
                throws IllegalStateException
プロパティの値を返します。

パラメータ:
target -
戻り値:
プロパティの値
例外:
IllegalStateException - プロパティがreadableではない場合。

setValue

public void setValue(Object target,
                     Object value)
              throws IllegalPropertyRuntimeException,
                     IllegalStateException
プロパティに値を設定します。

パラメータ:
target -
value -
例外:
IllegalPropertyRuntimeException - 値の設定に失敗した場合。
IllegalStateException - writableではない場合。

convertIfNeed

public Object convertIfNeed(Object value)
プロパティの型に応じて必要なら適切に変換します。

パラメータ:
value -
戻り値:
変換された値


Copyright © 2004-2007 The Seasar Foundation. All Rights Reserved.