# InstrumentationContext

[View Source](https://cs.android.com/search?q=file:com/android/build/api/instrumentation/InstrumentationContext.kt+class:com.android.build.api.instrumentation.InstrumentationContext) Added in 4.2.0


```
interface InstrumentationContext : Serializable
```

<br />

*** ** * ** ***

Instrumentation context data that will be injected to `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/instrumentation/AsmClassVisitorFactory` on instantiation.

## Summary

| ### Public properties |
|---|---|
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/instrumentation/InstrumentationContext#apiVersion()` The asm api version to be passed to the `https://asm.ow2.io/javadoc/org/objectweb/asm/ClassVisitor.html` constructor. |

## Public properties

### apiVersion

Added in 4.2.0

```
val apiVersion: Property<Int>
```

The asm api version to be passed to the `https://asm.ow2.io/javadoc/org/objectweb/asm/ClassVisitor.html` constructor.

```
| AGP version | Corresponding ASM version |
|---|---|
| 4.2.0 - 7.0 |            ASM7           |
|    7.1.0+   |            ASM9           |
```