# InspectableProperty

Artifact: [androidx.annotation:annotation](https://developer.android.com/jetpack/androidx/releases/annotation) [View Source](https://cs.android.com/search?q=file:androidx/annotation/InspectableProperty.jvm.kt+class:androidx.annotation.InspectableProperty) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.3.0)

*** ** * ** ***

Common/AllAndroid/JVM
- android

  ```
  @Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER])
  @Retention(value = AnnotationRetention.SOURCE)
  annotation InspectableProperty
  ```

*** ** * ** ***

> [!CAUTION]
> **This annotation is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

Denotes that the annotated method is the getter for a resources-backed property that should be shown in Android Studio's inspection tools.

## Summary

| ### Nested types |
|---|
| `@https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-target/index.html(allowedTargets = [https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-target/-a-n-n-o-t-a-t-i-o-n_-c-l-a-s-s/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-target/-c-l-a-s-s/index.html]) @https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-retention/index.html(value = https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-retention/-s-o-u-r-c-e/index.html) annotation https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.EnumEntry` **This annotation is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `@https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-target/index.html(allowedTargets = [https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-target/-a-n-n-o-t-a-t-i-o-n_-c-l-a-s-s/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-target/-c-l-a-s-s/index.html]) @https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-retention/index.html(value = https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-retention/-s-o-u-r-c-e/index.html) annotation https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.FlagEntry` **This annotation is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `enum https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.ValueType : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.ValueType>` **This enum is deprecated.** Replaced by the androidx.resourceinpsection package. |

| ### Public constructors |
|---|---|
| `[InspectableProperty](https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#InspectableProperty(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array))( name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, attributeId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, hasAttributeId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, valueType: https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.ValueType, enumMapping: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.EnumEntry>, flagMapping: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.FlagEntry> )` **This function is deprecated.** Replaced by the androidx.resourceinpsection package. | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#attributeId()` **This property is deprecated.** Replaced by the androidx.resourceinpsection package. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.EnumEntry>` | `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#enumMapping()` **This property is deprecated.** Replaced by the androidx.resourceinpsection package. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.FlagEntry>` | `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#flagMapping()` **This property is deprecated.** Replaced by the androidx.resourceinpsection package. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#hasAttributeId()` **This property is deprecated.** Replaced by the androidx.resourceinpsection package. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#name()` **This property is deprecated.** Replaced by the androidx.resourceinpsection package. | android |
| `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.ValueType` | `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#valueType()` **This property is deprecated.** Replaced by the androidx.resourceinpsection package. | android |

## Public constructors

### InspectableProperty

android Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.10.0) Deprecated in [1.10.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.10.0)

```
[InspectableProperty](https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#InspectableProperty(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array))(
    name: String = "",
    attributeId: Int = 0,
    hasAttributeId: Boolean = true,
    valueType: InspectableProperty.ValueType = ValueType.INFERRED,
    enumMapping: Array<InspectableProperty.EnumEntry> = [],
    flagMapping: Array<InspectableProperty.FlagEntry> = []
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

## Public properties

### attributeId

android

```
val attributeId: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

If the property is inflated from XML, the resource ID of its XML attribute.

If left as the default, and `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)` is true, the attribute ID will be inferred from `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The attribute ID of the property or the default null resource ID |

### enumMapping

android

```
val enumMapping: Array<InspectableProperty.EnumEntry>
```

> [!CAUTION]
> **This property is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

For enumerations packed into primitive {int} properties, map the values to string names.

Note that `#enumMapping()` cannot be used simultaneously with `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.EnumEntry>` | An array of `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.EnumEntry`, empty if not applicable |

### flagMapping

android

```
val flagMapping: Array<InspectableProperty.FlagEntry>
```

> [!CAUTION]
> **This property is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

For flags packed into primitive {int} properties, model the string names of the flags.

Note that `#flagMapping()` cannot be used simultaneously with `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.FlagEntry>` | An array of `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.FlagEntry`, empty if not applicable |

### hasAttributeId

android

```
val hasAttributeId: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

If this property has an attribute ID.

Set to false if the annotated property does not have an attribute ID, that is, it is not inflated from an XML attribute. This will prevent the automatic inference of the attribute.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether to infer an attribute ID if not supplied |

### name

android

```
val name: String
```

> [!CAUTION]
> **This property is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

The name of the property.

If left empty (the default), the property name will be inferred from the name of the getter method.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the property. |

### valueType

android

```
val valueType: InspectableProperty.ValueType
```

> [!CAUTION]
> **This property is deprecated.**   
> Replaced by the androidx.resourceinpsection package.

Specify how to interpret a value type packed into a primitive integer.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.ValueType` | A `https://developer.android.com/reference/kotlin/androidx/annotation/InspectableProperty.ValueType` |