public interface ResultConverter
This interface encapsulates the process of converting a result from one type to the other.
This is different from adapting results since conversion doesn't involve mandatory operations and can go through without any change to the original value. Also, converters are chained, so that the result of one is passed to the next and so one, whereas with adapters, you have a single adapter suitable for the current situation that operates on the result.
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(Invocation invocation,
Object original)
Called when we need to convert the result
|
Object convert(Invocation invocation, Object original)
invocation - the invocation for which the conversion is happeningoriginal - the original valueCopyright © 2014–2016. All rights reserved.