# DoNotInline

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

*** ** * ** ***


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

<br />

*** ** * ** ***

Denotes that the annotated method should not be inlined when the code is optimized at build time. This is typically used to avoid inlining purposely out-of-line methods that are intended to be in separate classes.

Example:

```
@DoNotInline
public void foo() {
    ...
}
```