woolpack.el.convert
クラス DelegationIfNecessityConverter

java.lang.Object
  上位を拡張 woolpack.el.convert.DelegationIfNecessityConverter
すべての実装されたインタフェース:
Convertable

public class DelegationIfNecessityConverter
extends java.lang.Object
implements Convertable

変換前の値が null である、または変換前の値の型が変換後の型と等しい、または変換後の型がObjectまたは null の場合は変換前の値を返し、それ以外の場合は委譲するConvertable

作成者:
nakamura

コンストラクタの概要
DelegationIfNecessityConverter(Convertable convertable)
          コンストラクタ。
 
メソッドの概要
 java.lang.Object convert(java.lang.Object beforeValue, java.lang.Class toType, java.lang.String propertyName)
          変換する。
 Convertable getConvertable()
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

DelegationIfNecessityConverter

public DelegationIfNecessityConverter(Convertable convertable)
コンストラクタ。

パラメータ:
convertable - 委譲先。
例外:
java.lang.NullPointerException - 引数が null の場合。
メソッドの詳細

convert

public java.lang.Object convert(java.lang.Object beforeValue,
                                java.lang.Class toType,
                                java.lang.String propertyName)
インタフェース Convertable の記述:
変換する。

定義:
インタフェース Convertable 内の convert
パラメータ:
beforeValue - 変換前のオブジェクト。
toType - 変換先の型。実装ではこのパラメータが動作に反映されない可能性がある。
propertyName - 変換元のプロパティ名。
戻り値:
変換後のオブジェクト。

getConvertable

public Convertable getConvertable()


Copyright (C) 2006 Takahiro Nakamura. All rights reserved.