JavaScript is disabled on your browser.
Field Summary
Fields
Modifier and Type
Field and Description
static BindHandler
DEFAULT
Default no-op bind handler.
Method Summary
All Methods Instance Methods Default Methods
Modifier and Type
Method and Description
default Object
onFailure (ConfigurationPropertyName name,
Bindable <?> target,
BindContext context,
Exception error)
default void
onFinish (ConfigurationPropertyName name,
Bindable <?> target,
BindContext context,
Object result)
Called when binding finishes, regardless of whether the property was bound or not.
default boolean
onStart (ConfigurationPropertyName name,
Bindable <?> target,
BindContext context)
Called when binding of an element starts but before any result has been determined.
default Object
onSuccess (ConfigurationPropertyName name,
Bindable <?> target,
BindContext context,
Object result)
Called when binding of an element ends with a successful result.
Method Detail
onStart
default boolean onStart(ConfigurationPropertyName name,
Bindable <?> target,
BindContext context)
Called when binding of an element starts but before any result has been determined.
Parameters:
name
- the name of the element being bound
target
- the item being bound
context
- the bind context
Returns:
true
if binding should proceed
onSuccess
default Object onSuccess(ConfigurationPropertyName name,
Bindable <?> target,
BindContext context,
Object result)
Called when binding of an element ends with a successful result. Implementations
may change the ultimately returned result or perform addition validation.
Parameters:
name
- the name of the element being bound
target
- the item being bound
context
- the bind context
result
- the bound result (never null
)
Returns:
the actual result that should be used (may be null
)
onFailure
default Object onFailure(ConfigurationPropertyName name,
Bindable <?> target,
BindContext context,
Exception error)
throws Exception
Parameters:
name
- the name of the element being bound
target
- the item being bound
context
- the bind context
error
- the cause of the error (if the exception stands it may be re-thrown)
Returns:
the actual result that should be used (may be null
).
Throws:
Exception
- if the binding isn't valid
onFinish
default void onFinish(ConfigurationPropertyName name,
Bindable <?> target,
BindContext context,
Object result)
throws Exception
Called when binding finishes, regardless of whether the property was bound or not.
Parameters:
name
- the name of the element being bound
target
- the item being bound
context
- the bind context
result
- the bound result (may be null
)
Throws:
Exception
- if the binding isn't valid