Skip to content

MapperTypeWrapper

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

data class MapperTypeWrapper<T : View>(type: Class<T>, mapper: WireframeMapper<T>)

A wrapper holding a a WireframeMapper and the type it's associated with.

Parameters

T the type of View the mapper can handle
type the Class representing the view type
mapper the WireframeMapper

Constructors

MapperTypeWrapper

constructor(type: Class<T>, mapper: WireframeMapper<T>)

Parameters
T the type of View the mapper can handle
type the Class representing the view type
mapper the WireframeMapper

Functions

getUnsafeMapper

fun getUnsafeMapper(): WireframeMapper<View>

Returns the mapper unsafely casted to WireframeMapper.

supportsView

fun supportsView(view: View): Boolean

Checks whether the underlying mapper would support mapping the given view.

Return

true if the mapper can take the view as an input

Parameters
view the view to map
Clone this wiki locally