# VarHandle.AccessMode

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# AccessMode

```
class AccessMode
```

|---|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                    |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\<[java.lang.invoke.VarHandle.AccessMode](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#)\> ||
|   | ↳ | [java.lang.invoke.VarHandle.AccessMode](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#) |

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [VarHandle.AccessMode.COMPARE_AND_EXCHANGE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE),[VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE_ACQUIRE),[VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE_RELEASE),[VarHandle.AccessMode.COMPARE_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_SET),[VarHandle.AccessMode.GET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET),[VarHandle.AccessMode.GET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_ACQUIRE),[VarHandle.AccessMode.GET_AND_ADD](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD),[VarHandle.AccessMode.GET_AND_ADD_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD_ACQUIRE),[VarHandle.AccessMode.GET_AND_ADD_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD_RELEASE),[VarHandle.AccessMode.GET_AND_BITWISE_AND](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND),[VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND_ACQUIRE),[VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND_RELEASE), and 19 others. |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [VarHandle.AccessMode.COMPARE_AND_EXCHANGE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE)                 | The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchange](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchange(kotlin.Any))               | | [VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE_ACQUIRE) | The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchangeAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchangeAcquire(kotlin.Any)) | | [VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE_RELEASE) | The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchangeRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchangeRelease(kotlin.Any)) | | [VarHandle.AccessMode.COMPARE_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_SET)                           | The access mode whose access is specified by the corresponding method[VarHandle.compareAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndSet(kotlin.Any))                         | | [VarHandle.AccessMode.GET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET)                                                   | The access mode whose access is specified by the corresponding method[VarHandle.get](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#get(kotlin.Any))                                             | | [VarHandle.AccessMode.GET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_ACQUIRE)                                   | The access mode whose access is specified by the corresponding method[VarHandle.getAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAcquire(kotlin.Any))                               | | [VarHandle.AccessMode.GET_AND_ADD](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD)                                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndAdd](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAdd(kotlin.Any))                                 | | [VarHandle.AccessMode.GET_AND_ADD_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD_ACQUIRE)                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndAddAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAddAcquire(kotlin.Any))                   | | [VarHandle.AccessMode.GET_AND_ADD_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD_RELEASE)                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndAddRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAddRelease(kotlin.Any))                   | | [VarHandle.AccessMode.GET_AND_BITWISE_AND](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND)                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAnd](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAnd(kotlin.Any))                   | | [VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND_ACQUIRE)   | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAndAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAndAcquire(kotlin.Any))     | | [VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND_RELEASE)   | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAndRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAndRelease(kotlin.Any))     | | [VarHandle.AccessMode.GET_AND_BITWISE_OR](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_OR)                     | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOr](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOr(kotlin.Any))                     | | [VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_OR_ACQUIRE)     | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOrAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOrAcquire(kotlin.Any))       | | [VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_OR_RELEASE)     | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOrRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOrRelease(kotlin.Any))       | | [VarHandle.AccessMode.GET_AND_BITWISE_XOR](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_XOR)                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXor](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXor(kotlin.Any))                   | | [VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_XOR_ACQUIRE)   | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXorAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXorAcquire(kotlin.Any))     | | [VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_XOR_RELEASE)   | The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXorRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXorRelease(kotlin.Any))     | | [VarHandle.AccessMode.GET_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_SET)                                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSet(kotlin.Any))                                 | | [VarHandle.AccessMode.GET_AND_SET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_SET_ACQUIRE)                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndSetAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSetAcquire(kotlin.Any))                   | | [VarHandle.AccessMode.GET_AND_SET_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_SET_RELEASE)                   | The access mode whose access is specified by the corresponding method[VarHandle.getAndSetRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSetRelease(kotlin.Any))                   | | [VarHandle.AccessMode.GET_OPAQUE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_OPAQUE)                                     | The access mode whose access is specified by the corresponding method[VarHandle.getOpaque](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getOpaque(kotlin.Any))                                 | | [VarHandle.AccessMode.GET_VOLATILE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_VOLATILE)                                 | The access mode whose access is specified by the corresponding method[VarHandle.getVolatile](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getVolatile(kotlin.Any))                             | | [VarHandle.AccessMode.SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET)                                                   | The access mode whose access is specified by the corresponding method[VarHandle.set](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#set(kotlin.Any))                                             | | [VarHandle.AccessMode.SET_OPAQUE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET_OPAQUE)                                     | The access mode whose access is specified by the corresponding method[VarHandle.setOpaque](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setOpaque(kotlin.Any))                                 | | [VarHandle.AccessMode.SET_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET_RELEASE)                                   | The access mode whose access is specified by the corresponding method[VarHandle.setRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setRelease(kotlin.Any))                               | | [VarHandle.AccessMode.SET_VOLATILE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET_VOLATILE)                                 | The access mode whose access is specified by the corresponding method[VarHandle.setVolatile](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setVolatile(kotlin.Any))                             | | [VarHandle.AccessMode.WEAK_COMPARE_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET)                 | The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSet(kotlin.Any))                 | | [VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET_ACQUIRE) | The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetAcquire(kotlin.Any))   | | [VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET_PLAIN)     | The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetPlain](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetPlain(kotlin.Any))       | | [VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET_RELEASE) | The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetRelease(kotlin.Any))   | |

The set of access modes that specify how a variable, referenced by a VarHandle, is accessed.

## Summary

|                                                                                                                                                                                         Enum values                                                                                                                                                                                         ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [COMPARE_AND_EXCHANGE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE) The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchange](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchange(kotlin.Any))                               |
| [COMPARE_AND_EXCHANGE_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchangeAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchangeAcquire(kotlin.Any)) |
| [COMPARE_AND_EXCHANGE_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_EXCHANGE_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchangeRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchangeRelease(kotlin.Any)) |
| [COMPARE_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:COMPARE_AND_SET) The access mode whose access is specified by the corresponding method[VarHandle.compareAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndSet(kotlin.Any))                                                   |
| [GET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET) The access mode whose access is specified by the corresponding method[VarHandle.get](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#get(kotlin.Any))                                                                                               |
| [GET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.getAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAcquire(kotlin.Any))                                                                 |
| [GET_AND_ADD](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD) The access mode whose access is specified by the corresponding method[VarHandle.getAndAdd](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAdd(kotlin.Any))                                                                   |
| [GET_AND_ADD_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.getAndAddAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAddAcquire(kotlin.Any))                                     |
| [GET_AND_ADD_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_ADD_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.getAndAddRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAddRelease(kotlin.Any))                                     |
| [GET_AND_BITWISE_AND](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAnd](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAnd(kotlin.Any))                                     |
| [GET_AND_BITWISE_AND_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAndAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAndAcquire(kotlin.Any))       |
| [GET_AND_BITWISE_AND_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_AND_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAndRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAndRelease(kotlin.Any))       |
| [GET_AND_BITWISE_OR](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_OR) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOr](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOr(kotlin.Any))                                         |
| [GET_AND_BITWISE_OR_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_OR_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOrAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOrAcquire(kotlin.Any))           |
| [GET_AND_BITWISE_OR_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_OR_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOrRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOrRelease(kotlin.Any))           |
| [GET_AND_BITWISE_XOR](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_XOR) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXor](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXor(kotlin.Any))                                     |
| [GET_AND_BITWISE_XOR_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_XOR_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXorAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXorAcquire(kotlin.Any))       |
| [GET_AND_BITWISE_XOR_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_BITWISE_XOR_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXorRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXorRelease(kotlin.Any))       |
| [GET_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_SET) The access mode whose access is specified by the corresponding method[VarHandle.getAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSet(kotlin.Any))                                                                   |
| [GET_AND_SET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_SET_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.getAndSetAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSetAcquire(kotlin.Any))                                     |
| [GET_AND_SET_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_AND_SET_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.getAndSetRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSetRelease(kotlin.Any))                                     |
| [GET_OPAQUE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_OPAQUE) The access mode whose access is specified by the corresponding method[VarHandle.getOpaque](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getOpaque(kotlin.Any))                                                                     |
| [GET_VOLATILE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:GET_VOLATILE) The access mode whose access is specified by the corresponding method[VarHandle.getVolatile](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getVolatile(kotlin.Any))                                                             |
| [SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET) The access mode whose access is specified by the corresponding method[VarHandle.set](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#set(kotlin.Any))                                                                                               |
| [SET_OPAQUE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET_OPAQUE) The access mode whose access is specified by the corresponding method[VarHandle.setOpaque](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setOpaque(kotlin.Any))                                                                     |
| [SET_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.setRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setRelease(kotlin.Any))                                                                 |
| [SET_VOLATILE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:SET_VOLATILE) The access mode whose access is specified by the corresponding method[VarHandle.setVolatile](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setVolatile(kotlin.Any))                                                             |
| [WEAK_COMPARE_AND_SET](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET) The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSet(kotlin.Any))                                 |
| [WEAK_COMPARE_AND_SET_ACQUIRE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET_ACQUIRE) The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetAcquire(kotlin.Any))   |
| [WEAK_COMPARE_AND_SET_PLAIN](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET_PLAIN) The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetPlain](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetPlain(kotlin.Any))           |
| [WEAK_COMPARE_AND_SET_RELEASE](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#ENUM_VALUE:WEAK_COMPARE_AND_SET_RELEASE) The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetRelease(kotlin.Any))   |

|                                                                                                                                                                                                                                  Public methods                                                                                                                                                                                                                                   ||
|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!                                    | [methodName](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#methodName())`()` Returns the`VarHandle`signature-polymorphic method name associated with this`AccessMode`value.                                                                                                                                          |
| static[VarHandle.AccessMode](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#)! | [valueFromMethodName](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#valueFromMethodName(kotlin.String))`(`methodName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Returns the`AccessMode`value associated with the specified`VarHandle`signature-polymorphic method name. |

## Enum values

### COMPARE_AND_EXCHANGE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val COMPARE_AND_EXCHANGE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchange](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchange(kotlin.Any))  

### COMPARE_AND_EXCHANGE_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val COMPARE_AND_EXCHANGE_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchangeAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchangeAcquire(kotlin.Any))  

### COMPARE_AND_EXCHANGE_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val COMPARE_AND_EXCHANGE_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.compareAndExchangeRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndExchangeRelease(kotlin.Any))  

### COMPARE_AND_SET

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val COMPARE_AND_SET : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.compareAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#compareAndSet(kotlin.Any))  

### GET

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.get](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#get(kotlin.Any))  

### GET_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAcquire(kotlin.Any))  

### GET_AND_ADD

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_ADD : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndAdd](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAdd(kotlin.Any))  

### GET_AND_ADD_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_ADD_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndAddAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAddAcquire(kotlin.Any))  

### GET_AND_ADD_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_ADD_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndAddRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndAddRelease(kotlin.Any))  

### GET_AND_BITWISE_AND

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_AND : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAnd](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAnd(kotlin.Any))  

### GET_AND_BITWISE_AND_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_AND_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAndAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAndAcquire(kotlin.Any))  

### GET_AND_BITWISE_AND_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_AND_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseAndRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseAndRelease(kotlin.Any))  

### GET_AND_BITWISE_OR

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_OR : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOr](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOr(kotlin.Any))  

### GET_AND_BITWISE_OR_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_OR_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOrAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOrAcquire(kotlin.Any))  

### GET_AND_BITWISE_OR_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_OR_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseOrRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseOrRelease(kotlin.Any))  

### GET_AND_BITWISE_XOR

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_XOR : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXor](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXor(kotlin.Any))  

### GET_AND_BITWISE_XOR_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_XOR_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXorAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXorAcquire(kotlin.Any))  

### GET_AND_BITWISE_XOR_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_BITWISE_XOR_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndBitwiseXorRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndBitwiseXorRelease(kotlin.Any))  

### GET_AND_SET

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_SET : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSet(kotlin.Any))  

### GET_AND_SET_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_SET_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndSetAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSetAcquire(kotlin.Any))  

### GET_AND_SET_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_AND_SET_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getAndSetRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getAndSetRelease(kotlin.Any))  

### GET_OPAQUE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_OPAQUE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getOpaque](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getOpaque(kotlin.Any))  

### GET_VOLATILE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val GET_VOLATILE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.getVolatile](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#getVolatile(kotlin.Any))  

### SET

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val SET : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.set](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#set(kotlin.Any))  

### SET_OPAQUE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val SET_OPAQUE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.setOpaque](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setOpaque(kotlin.Any))  

### SET_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val SET_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.setRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setRelease(kotlin.Any))  

### SET_VOLATILE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val SET_VOLATILE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.setVolatile](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#setVolatile(kotlin.Any))  

### WEAK_COMPARE_AND_SET

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val WEAK_COMPARE_AND_SET : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSet](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSet(kotlin.Any))  

### WEAK_COMPARE_AND_SET_ACQUIRE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val WEAK_COMPARE_AND_SET_ACQUIRE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetAcquire](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetAcquire(kotlin.Any))  

### WEAK_COMPARE_AND_SET_PLAIN

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val WEAK_COMPARE_AND_SET_PLAIN : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetPlain](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetPlain(kotlin.Any))  

### WEAK_COMPARE_AND_SET_RELEASE

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val WEAK_COMPARE_AND_SET_RELEASE : VarHandle.AccessMode
```

The access mode whose access is specified by the corresponding method[VarHandle.weakCompareAndSetRelease](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle#weakCompareAndSetRelease(kotlin.Any))

## Public methods

### methodName

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun methodName(): String!
```

Returns the`VarHandle`signature-polymorphic method name associated with this`AccessMode`value.

|                                                          Return                                                          ||
|-----------------------------------------------------------------------------------|---------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | the signature-polymorphic method name |

**See Also**

- [#valueFromMethodName](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#valueFromMethodName(kotlin.String))  

### valueFromMethodName

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static fun valueFromMethodName(methodName: String!): VarHandle.AccessMode!
```

Returns the`AccessMode`value associated with the specified`VarHandle`signature-polymorphic method name.

|                                                              Parameters                                                               ||
|--------------|-------------------------------------------------------------------------------------------------------------------------|
| `methodName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!:the signature-polymorphic method name |

|                                                                Return                                                                ||
|----------------------------------------------------------------------------------------------------------------|----------------------|
| [VarHandle.AccessMode](https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#)! | the`AccessMode`value |

|                                                                                              Exceptions                                                                                              ||
|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java.lang.IllegalArgumentException` | if there is no`AccessMode`value associated with method name (indicating the method name does not correspond to a`VarHandle`signature-polymorphic method name). |

**See Also**

- <https://developer.android.com/reference/kotlin/java/lang/invoke/VarHandle.AccessMode#methodName()>