类 IgnoreErrorsBindHandler
java.lang.Object
cn.taketoday.context.properties.bind.AbstractBindHandler
cn.taketoday.context.properties.bind.handler.IgnoreErrorsBindHandler
- 所有已实现的接口:
BindHandler
BindHandler that can be used to ignore binding errors.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Madhura Bhave, Harry Yang
-
字段概要
从接口继承的字段 cn.taketoday.context.properties.bind.BindHandler
DEFAULT -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) Called when binding fails for any reason (including failures fromBindHandler.onSuccess(cn.taketoday.context.properties.source.ConfigurationPropertyName, cn.taketoday.context.properties.bind.Bindable<?>, cn.taketoday.context.properties.bind.BindContext, java.lang.Object)orBindHandler.onCreate(cn.taketoday.context.properties.source.ConfigurationPropertyName, cn.taketoday.context.properties.bind.Bindable<?>, cn.taketoday.context.properties.bind.BindContext, java.lang.Object)calls).从类继承的方法 cn.taketoday.context.properties.bind.AbstractBindHandler
onFinish, onStart, onSuccess从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.context.properties.bind.BindHandler
onCreate
-
构造器详细资料
-
IgnoreErrorsBindHandler
public IgnoreErrorsBindHandler() -
IgnoreErrorsBindHandler
-
-
方法详细资料
-
onFailure
@Nullable public Object onFailure(ConfigurationPropertyName name, Bindable<?> target, BindContext context, Exception error) throws Exception 从接口复制的说明:BindHandlerCalled when binding fails for any reason (including failures fromBindHandler.onSuccess(cn.taketoday.context.properties.source.ConfigurationPropertyName, cn.taketoday.context.properties.bind.Bindable<?>, cn.taketoday.context.properties.bind.BindContext, java.lang.Object)orBindHandler.onCreate(cn.taketoday.context.properties.source.ConfigurationPropertyName, cn.taketoday.context.properties.bind.Bindable<?>, cn.taketoday.context.properties.bind.BindContext, java.lang.Object)calls). Implementations may choose to swallow exceptions and return an alternative result.- 指定者:
onFailure在接口中BindHandler- 覆盖:
onFailure在类中AbstractBindHandler- 参数:
name- the name of the element being boundtarget- the item being boundcontext- the bind contexterror- the cause of the error (if the exception stands it may be re-thrown)- 返回:
- the actual result that should be used (may be
null). - 抛出:
Exception- if the binding isn't valid
-