Module java.base
Package java.lang.invoke

## Enum VarHandle.AccessMode

- java.lang.Object
- - java.lang.Enum<VarHandle.AccessMode>
  - - java.lang.invoke.VarHandle.AccessMode

All Implemented Interfaces:
  Serializable, Comparable<VarHandle.AccessMode>

Enclosing class:
  VarHandle

    public static enum VarHandle.AccessMode
    extends Enum<VarHandle.AccessMode>

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

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`addAndGet` The access mode whose access is specified by the corresponding method `VarHandle.addAndGet`
`compareAndExchangeAcquire` The access mode whose access is specified by the corresponding method `VarHandle.compareAndExchangeAcquire`
`compareAndExchangeRelease` The access mode whose access is specified by the corresponding method `VarHandle.compareAndExchangeRelease`
`compareAndExchangeVolatile` The access mode whose access is specified by the corresponding method `VarHandle.compareAndExchangeVolatile`
`compareAndSet` The access mode whose access is specified by the corresponding method `VarHandle.compareAndSet`
`get` The access mode whose access is specified by the corresponding method `VarHandle.get`
`getAcquire` The access mode whose access is specified by the corresponding method `VarHandle.getAcquire`
`getAndAdd` The access mode whose access is specified by the corresponding method `VarHandle.getAndAdd`
`getAndSet` The access mode whose access is specified by the corresponding method `VarHandle.getAndSet`
`getOpaque` The access mode whose access is specified by the corresponding method `VarHandle.getOpaque`
`getVolatile` The access mode whose access is specified by the corresponding method `VarHandle.getVolatile`
`set` The access mode whose access is specified by the corresponding method `VarHandle.set`
`setOpaque` The access mode whose access is specified by the corresponding method `VarHandle.setOpaque`
`setRelease` The access mode whose access is specified by the corresponding method `VarHandle.setRelease`
`setVolatile` The access mode whose access is specified by the corresponding method `VarHandle.setVolatile`
`weakCompareAndSet` The access mode whose access is specified by the corresponding method `VarHandle.weakCompareAndSet`
`weakCompareAndSetAcquire` The access mode whose access is specified by the corresponding method `VarHandle.weakCompareAndSetAcquire`
`weakCompareAndSetRelease` The access mode whose access is specified by the corresponding method `VarHandle.weakCompareAndSetRelease`

### Method Summary

All Methods Static Methods Concrete Methods
`static VarHandle.AccessMode` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static VarHandle.AccessMode[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### addAndGet

    public static final VarHandle.AccessMode addAndGet

The access mode whose access is specified by the corresponding method `VarHandle.addAndGet`

#### compareAndExchangeAcquire

    public static final VarHandle.AccessMode compareAndExchangeAcquire

The access mode whose access is specified by the corresponding method `VarHandle.compareAndExchangeAcquire`

#### compareAndExchangeRelease

    public static final VarHandle.AccessMode compareAndExchangeRelease

The access mode whose access is specified by the corresponding method `VarHandle.compareAndExchangeRelease`

#### compareAndExchangeVolatile

    public static final VarHandle.AccessMode compareAndExchangeVolatile

The access mode whose access is specified by the corresponding method `VarHandle.compareAndExchangeVolatile`

#### compareAndSet

    public static final VarHandle.AccessMode compareAndSet

The access mode whose access is specified by the corresponding method `VarHandle.compareAndSet`

#### get

    public static final VarHandle.AccessMode get

The access mode whose access is specified by the corresponding method `VarHandle.get`

#### getAcquire

    public static final VarHandle.AccessMode getAcquire

The access mode whose access is specified by the corresponding method `VarHandle.getAcquire`

#### getAndAdd

    public static final VarHandle.AccessMode getAndAdd

The access mode whose access is specified by the corresponding method `VarHandle.getAndAdd`

#### getAndSet

    public static final VarHandle.AccessMode getAndSet

The access mode whose access is specified by the corresponding method `VarHandle.getAndSet`

#### getOpaque

    public static final VarHandle.AccessMode getOpaque

The access mode whose access is specified by the corresponding method `VarHandle.getOpaque`

#### getVolatile

    public static final VarHandle.AccessMode getVolatile

The access mode whose access is specified by the corresponding method `VarHandle.getVolatile`

#### set

    public static final VarHandle.AccessMode set

The access mode whose access is specified by the corresponding method `VarHandle.set`

#### setOpaque

    public static final VarHandle.AccessMode setOpaque

The access mode whose access is specified by the corresponding method `VarHandle.setOpaque`

#### setRelease

    public static final VarHandle.AccessMode setRelease

The access mode whose access is specified by the corresponding method `VarHandle.setRelease`

#### setVolatile

    public static final VarHandle.AccessMode setVolatile

The access mode whose access is specified by the corresponding method `VarHandle.setVolatile`

#### weakCompareAndSet

    public static final VarHandle.AccessMode weakCompareAndSet

The access mode whose access is specified by the corresponding method `VarHandle.weakCompareAndSet`

#### weakCompareAndSetAcquire

    public static final VarHandle.AccessMode weakCompareAndSetAcquire

The access mode whose access is specified by the corresponding method `VarHandle.weakCompareAndSetAcquire`

#### weakCompareAndSetRelease

    public static final VarHandle.AccessMode weakCompareAndSetRelease

The access mode whose access is specified by the corresponding method `VarHandle.weakCompareAndSetRelease`

### Method Detail

#### values

    public static VarHandle.AccessMode[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (VarHandle.AccessMode c : VarHandle.AccessMode.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static VarHandle.AccessMode valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null