On SR mappers, we added a generic type argument to tell the type of wireframe we output. In practice, this became useless as the map method returns a list of wireframe, more often than not of different types, meaning almost every implementation uses the most generic type as an argument (MobileSegment.Wireframe instead of ImageWireframe or TextWireframe), and the actual type is never used in calling methods.
In addition, we have to use some unchecked casts when creating the list of mappers, e.g.:
@Suppress("UNCHECKED_CAST")
val sliderWireframeMapper = SliderWireframeMapper(…) as WireframeMapper<View, *>
What does this PR do?
On SR mappers, we added a generic type argument to tell the type of wireframe we output. In practice, this became useless as the map method returns a list of wireframe, more often than not of different types, meaning almost every implementation uses the most generic type as an argument (MobileSegment.Wireframe instead of ImageWireframe or TextWireframe), and the actual type is never used in calling methods.
In addition, we have to use some unchecked casts when creating the list of mappers, e.g.:
This PR aims at simplifying this part.