{% setvar book_path %}/reference/kotlin/dokkatest/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
annotation InspectableProperty
Marks a getter of a property on an inspectable node. This annotation is inherited by default. If a child class doesn't add it to a getter, but a parent class does, the property will be inspected, even if the child overrides the definition of the getter. If a child class defines a property of the same name of a property on the parent but on a different getter, the inspector will use the child's getter when inspecting instances of the child, and the parent's otherwise.
See also | |
---|---|
InspectionCompanion |
InspectionCompanion#mapProperties(PropertyMapper) |
InspectionCompanion |
InspectionCompanion#readProperties(Object, PropertyReader) |
Nested types |
|
---|---|
InspectableProperty.EnumEntry |
One entry in an enumeration packed into a primitive {int}. |
InspectableProperty.FlagEntry |
One flag value of many that may be packed into a primitive {int}. |
InspectableProperty.ValueType |
The type of value packed into a primitive {int}. |
Public functions |
|
---|---|
abstract Int |
If the property is inflated from XML, the resource ID of its XML attribute.If left as {ID_NULL}, and |
abstract Array<InspectableProperty.EnumEntry> |
For enumerations packed into primitive {int} properties, map the values to string names.Note that |
abstract Array<InspectableProperty.FlagEntry> |
For flags packed into primitive {int} properties, model the string names of the flags.Note that |
abstract Boolean |
If this property has an attribute ID.Set to false if the annotated property does not have an attribute ID, that is, it is notinflated from an XML attribute. |
abstract String |
name() The name of the property.If left empty (the default), the property name will be inferred from the name of the gettermethod. |
abstract InspectableProperty.ValueType |
Specify how to interpret a value type packed into a primitive integer. |
abstract fun attributeId(): Int
If the property is inflated from XML, the resource ID of its XML attribute.If left as {ID_NULL}, and hasAttributeId
is true, the attribute ID will beinferred from name
.
Returns | |
---|---|
Int |
The attribute ID of the property or ID_NULL |
abstract fun enumMapping(): Array<InspectableProperty.EnumEntry>
For enumerations packed into primitive {int} properties, map the values to string names.Note that enumMapping
cannot be used simultaneously with flagMapping
.
Returns | |
---|---|
Array<InspectableProperty.EnumEntry> |
An array of |
See also | |
---|---|
IntDef |
abstract fun flagMapping(): Array<InspectableProperty.FlagEntry>
For flags packed into primitive {int} properties, model the string names of the flags.Note that flagMapping
cannot be used simultaneously with enumMapping
.
Returns | |
---|---|
Array<InspectableProperty.FlagEntry> |
An array of |
See also | |
---|---|
IntDef |
|
IntFlagMapping |
abstract fun hasAttributeId(): Boolean
If this property has an attribute ID.Set to false if the annotated property does not have an attribute ID, that is, it is notinflated from an XML attribute. This will prevent the automatic inference of the attributeID if attributeId
is set to ID_NULL.
Returns | |
---|---|
Boolean |
Whether to infer an attribute ID if not supplied |
abstract fun name(): String
The name of the property.If left empty (the default), the property name will be inferred from the name of the gettermethod.
Returns | |
---|---|
String |
The name of the property. |
abstract fun valueType(): InspectableProperty.ValueType
Specify how to interpret a value type packed into a primitive integer.
Returns | |
---|---|
InspectableProperty.ValueType |