public class InjectValueErrorHandlingStrategy extends Object implements ErrorHandlingStrategy
ErrorHandlingStrategy throws| Constructor and Description |
|---|
InjectValueErrorHandlingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
handleIllegalEval(String message,
T defaultValue)
This handler is called in case there is some bug in the evaluation.
|
<T> T |
handleMissingValue(String path,
T defaultValue)
This handler is invoked when a value cannot be resolved from a path.
|
<T> T |
handleTypeMismatch(String path,
String expected,
String actual,
T defaultValue)
This handler is invoked when there is type mismatch between value at path and that present in json.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparamValidationFailurepublic <T> T handleMissingValue(String path, T defaultValue)
handleMissingValue in interface ErrorHandlingStrategyT - Type of default Valuepath - Path for which value was not founddefaultValue - Default value to be returned if presentpublic <T> T handleTypeMismatch(String path, String expected, String actual, T defaultValue)
handleTypeMismatch in interface ErrorHandlingStrategyT - Type of defaultValuepath - Path for which value mismatch was detectedexpected - Expected typeactual - Type found in provided jsondefaultValue - Default value to be returned in case of mismatchpublic <T> T handleIllegalEval(String message, T defaultValue)
handleIllegalEval in interface ErrorHandlingStrategyT - Type of defaultValuemessage - Custom message provided at assertion sitedefaultValue - Default value to be returned if this state is facedCopyright © 2019. All rights reserved.