public interface BindHandlerbinding 中に追加のロジックを処理するために使用できるコールバックインターフェース。| 修飾子と型 | フィールドと説明 |
|---|---|
static BindHandler | DEFAULT デフォルトの no-op バインドハンドラー。 |
static final BindHandler DEFAULT
default <T> Bindable<T> onStart(ConfigurationPropertyName name, Bindable<T> target, BindContext context)
T - バインド可能なソース型 name - バインドされている要素の名前 target - バインドされているアイテム context - バインドコンテキスト null の場合があります)default ObjectSE onSuccess(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ObjectSE result)
name - バインドされている要素の名前 target - バインドされているアイテム context - バインドコンテキスト result - バインドされた結果 (非 null)null の場合があります)default ObjectSE onCreate(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ObjectSE result)
name - バインドされている要素の名前 target - バインドされているアイテム context - バインドコンテキスト result - 新しく作成されたインスタンス (非 null)null であってはなりません)default ObjectSE onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ExceptionSE error) throws ExceptionSE
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) または 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) 呼び出しからの失敗を含む)。実装は、例外を飲み込み、代替結果を返すことを選択できます。name - バインドされている要素の名前 target - バインドされているアイテム context - バインドコンテキスト error - エラーの原因 (例外が発生した場合、再スローされる可能性があります)null の場合があります)。ExceptionSE - バインディングが有効でない場合 default void onFinish(ConfigurationPropertyName name, Bindable<?> target, BindContext context, ObjectSE result) throws ExceptionSE
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) から結果を返したとしても、バインディングが失敗した場合、このメソッドは呼び出されません。name - バインドされている要素の名前 target - バインドされているアイテム context - バインドコンテキスト result - バインドされた結果 (null の場合があります)ExceptionSE - バインディングが有効でない場合