public abstract class AbstractBindHandler extends ObjectSE implements BindHandler
BindHandler
実装の抽象基本クラス。DEFAULT
コンストラクターと説明 |
---|
AbstractBindHandler() 新しいバインディングハンドラーインスタンスを作成します。 |
AbstractBindHandler(BindHandler parent) 特定の親を持つ新しいバインディングハンドラーインスタンスを作成します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
onCreate
public AbstractBindHandler()
public AbstractBindHandler(BindHandler parent)
parent
- 親ハンドラー public <T> Bindable<T> onStart(ConfigurationPropertyName name, Bindable<T> target, BindContext context)
BindHandler
BindHandler
の onStart
T
- バインド可能なソース型 name
- バインドされている要素の名前 target
- バインドされているアイテム context
- バインドコンテキスト null
の場合があります)public ObjectSE onSuccess(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ObjectSE result)
BindHandler
BindHandler
の onSuccess
name
- バインドされている要素の名前 target
- バインドされているアイテム context
- バインドコンテキスト result
- バインドされた結果 (非 null
)null
の場合があります)public ObjectSE onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ExceptionSE error) throws ExceptionSE
BindHandler
BindHandler.onSuccess(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Object)
または BindHandler.onCreate(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Object)
呼び出しからの失敗を含む)。実装は、例外を飲み込み、代替結果を返すことを選択できます。BindHandler
の onFailure
name
- バインドされている要素の名前 target
- バインドされているアイテム context
- バインドコンテキスト error
- エラーの原因 (例外が発生した場合、再スローされる可能性があります)null
の場合があります)。ExceptionSE
- バインディングが有効でない場合 public void onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ObjectSE result) throws ExceptionSE
BindHandler
BindHandler.onFailure(org.springframework.boot.context.properties.source.ConfigurationPropertyName, org.springframework.boot.context.properties.bind.Bindable<?>, org.springframework.boot.context.properties.bind.BindContext, java.lang.Exception)
から結果を返したとしても、バインディングが失敗した場合、このメソッドは呼び出されません。BindHandler
の onFinish
name
- バインドされている要素の名前 target
- バインドされているアイテム context
- バインドコンテキスト result
- バインドされた結果 (null
の場合があります)ExceptionSE
- バインディングが有効でない場合