Simplify Convert Function
@@ -37,17 +37,13 @@ public interface ConvertFunction<F, T> {
* {@code null} as the convert function will not be invoked for
* null values.
* @param targetType The target type.
- * @param root The root object, if this obj was embedded in a root object.
- * Otherwise {@code null}.
- * @param keyPath If the object is embedded in a root object, the path of
- * keys that reach this object. Otherwise {@code null}.
* @return The conversion result or {@code null} to indicate that the
* convert function cannot handle this conversion. In this case the
* next matching rule or adapter will be given a opportunity to
* convert.
* @throws Exception
*/
- T convert(F obj, Type targetType, Object root, Object[] keyPath)
+ T convert(F obj, Type targetType)
throws Exception;
/**
@@ -59,17 +55,12 @@ public interface ConvertFunction<F, T> {
* {@code null} as the convert function will not be invoked for
* null values.
* @param targetType The target type.
- * @param root The root object, if this obj was embedded in a root object.
- * Otherwise {@code null}.
- * @param keyPath If the object is embedded in a root object, the path of
- * keys that reach this object. Otherwise {@code null}.
* @return A value to use in case of an error. This method can return
* {@code null} to indicate that it cannot handle the error.
* @throws RuntimeException Another Runtime Exception may also be thrown by
* this handler.
*/
- default T handleError(F obj, Type targetType, Object root,
- Object[] keyPath) {
+ default T handleError(F obj, Type targetType) {
return null;
}
}
