# 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)

*** ** * ** ***


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

<br />

*** ** * ** ***

> [!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) public annotation https://developer.android.com/reference/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) public annotation https://developer.android.com/reference/androidx/annotation/InspectableProperty.FlagEntry` **This annotation is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `public enum https://developer.android.com/reference/androidx/annotation/InspectableProperty.ValueType extends https://developer.android.com/reference/java/lang/Enum.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/annotation/InspectableProperty.ValueType>` **This enum is deprecated.** Replaced by the androidx.resourceinpsection package. |

| ### Public methods |
|---|---|
| `final int` | `[getAttributeId](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getAttributeId())()` **This method is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull InspectableProperty.EnumEntry[]` | `[getEnumMapping](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getEnumMapping())()` **This method is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull InspectableProperty.FlagEntry[]` | `[getFlagMapping](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getFlagMapping())()` **This method is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `final boolean` | `[getHasAttributeId](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getHasAttributeId())()` **This method is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[getName](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getName())()` **This method is deprecated.** Replaced by the androidx.resourceinpsection package. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/annotation/InspectableProperty.ValueType` | `[getValueType](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getValueType())()` **This method is deprecated.** Replaced by the androidx.resourceinpsection package. |

## Public methods

### getAttributeId

```
public final int [getAttributeId](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getAttributeId())()
```

> [!CAUTION]
> **This method 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/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/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)`.

| Returns |
|---|---|
| `int` | The attribute ID of the property or the default null resource ID |

### getEnumMapping

```
public final @NonNull InspectableProperty.EnumEntry[] [getEnumMapping](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getEnumMapping())()
```

> [!CAUTION]
> **This method 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/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)`.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull InspectableProperty.EnumEntry[]` | An array of `https://developer.android.com/reference/androidx/annotation/InspectableProperty.EnumEntry`, empty if not applicable |

### getFlagMapping

```
public final @NonNull InspectableProperty.FlagEntry[] [getFlagMapping](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getFlagMapping())()
```

> [!CAUTION]
> **This method 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/androidx/annotation/InspectableProperty#(kotlin.String,kotlin.Int,kotlin.Boolean,androidx.annotation.InspectableProperty.ValueType,kotlin.Array,kotlin.Array)`.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull InspectableProperty.FlagEntry[]` | An array of `https://developer.android.com/reference/androidx/annotation/InspectableProperty.FlagEntry`, empty if not applicable |

### getHasAttributeId

```
public final boolean [getHasAttributeId](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getHasAttributeId())()
```

> [!CAUTION]
> **This method 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 |
|---|---|
| `boolean` | Whether to infer an attribute ID if not supplied |

### getName

```
public final @NonNull String [getName](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getName())()
```

> [!CAUTION]
> **This method 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://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | The name of the property. |

### getValueType

```
public final @NonNull InspectableProperty.ValueType [getValueType](https://developer.android.com/reference/androidx/annotation/InspectableProperty#getValueType())()
```

> [!CAUTION]
> **This method 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/androidx/annotation/NonNull https://developer.android.com/reference/androidx/annotation/InspectableProperty.ValueType` | A `https://developer.android.com/reference/androidx/annotation/InspectableProperty.ValueType` |