AttributeDelegate

class AttributeDelegate<in TAttribute, out TTransform>(kClass: KClass<*>, isNullable: Boolean, inherited: Boolean, name: String? = null, namespace: String? = null, defaultValue: TTransform? = null, transform: (TAttribute) -> TTransform = { it as TTransform })(source)

Constructors

Link copied to clipboard
constructor(kClass: KClass<*>, isNullable: Boolean, inherited: Boolean, name: String? = null, namespace: String? = null, defaultValue: TTransform? = null, transform: (TAttribute) -> TTransform = { it as TTransform })

Functions

Link copied to clipboard
operator fun getValue(element: XmlChildNode, property: KProperty<*>): TTransform
Link copied to clipboard
operator fun setValue(element: XmlChildNode, property: KProperty<*>, value: Any?)

Sets the value of the attribute represented by this delegate on the given XML element. The value is converted to a string and stored in the element's attributes' map.