# UseExperimental

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

*** ** * ** ***


```
@Retention(value = AnnotationRetention.BINARY)
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FILE, AnnotationTarget.TYPEALIAS])
public annotation UseExperimental
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This annotation is deprecated.**   
> This annotation has been replaced by \`@OptIn\`, use this instead:
>
> ```
> OptIn
> ```

Allows use of an experimental API denoted by the given markers in the annotated file, declaration, or expression. If a declaration is annotated with `https://developer.android.com/reference/androidx/annotation/experimental/UseExperimental`, its usages are **not** required to opt-in to that experimental API.

## Summary

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull KClass[]` | `[getMarkerClass](https://developer.android.com/reference/androidx/annotation/experimental/UseExperimental#getMarkerClass())()` **This method is deprecated.** This annotation has been replaced by \`@OptIn\` |

## Public methods

### getMarkerClass

```
public final @NonNull KClass[] [getMarkerClass](https://developer.android.com/reference/androidx/annotation/experimental/UseExperimental#getMarkerClass())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This annotation has been replaced by \`@OptIn\`, use this instead:
>
> ```
> OptIn
> ```

Defines the experimental API(s) whose usage this annotation allows.