instanceOf

inline fun <S : T> instanceOf(typeName: String, converter: ItemConverter<S>)

Registers converter for objects which are instances of S (i.e., objects whose class is S or any subtype of S)

Parameters

typeName

The value stored in the type attribute for matching objects

converter

The ItemConverter for matching objects

Type Parameters

S

The type to register


fun <S : T> instanceOf(typeName: String, kClass: KClass<S>, converter: ItemConverter<S>)

Registers converter for objects which are instances of kClass (i.e., objects whose class is kClass or any subtype of kClass)

Parameters

typeName

The value stored in the type attribute for matching objects

kClass

The class of S

converter

The ItemConverter for matching objects

Type Parameters

S

The type to register