Package org.spongepowered.asm.mixin.injection.callback

## Enum LocalCapture

- java.lang.Object
- - java.lang.Enum<LocalCapture>
  - - org.spongepowered.asm.mixin.injection.callback.LocalCapture

All Implemented Interfaces:
  `java.io.Serializable`, `java.lang.Comparable<LocalCapture>`

    public enum LocalCapture
    extends java.lang.Enum<LocalCapture>

Specifies the behaviour for capturing local variables at an injection point.

Since local capture relies on calculating the local variable table for the target method it is disabled by default for performance reasons. When capturing is enabled, local variables are passed to the handler method after the `CallbackInfo` argument. Since it is entirely possible for another transformer to make an incompatible change to the the local variable table at run time, the purpose of this enum is to specify the behaviour for local capture and the type of recovery to be performed when an incompatible change is detected.

### Enum Constant Summary

Enum Constants
`CAPTURE_FAILEXCEPTION` Capture locals.
`CAPTURE_FAILHARD` Capture locals.
`CAPTURE_FAILSOFT` Capture locals.
`NO_CAPTURE` Do not capture locals, this is the default behaviour
`PRINT` Do not capture locals.

### Method Summary

All Methods Static Methods Concrete Methods
`static LocalCapture` `valueOf​(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static LocalCapture[]` `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

#### NO_CAPTURE

    public static final LocalCapture NO_CAPTURE

Do not capture locals, this is the default behaviour

#### PRINT

    public static final LocalCapture PRINT

Do not capture locals. Print the expected method signature to stderr instead.

#### CAPTURE_FAILSOFT

    public static final LocalCapture CAPTURE_FAILSOFT

Capture locals. If the calculated locals are different from the expected values, log a warning and skip this injection.

#### CAPTURE_FAILHARD

    public static final LocalCapture CAPTURE_FAILHARD

Capture locals. If the calculated locals are different from the expected values, throw an `Error`.

#### CAPTURE_FAILEXCEPTION

    public static final LocalCapture CAPTURE_FAILEXCEPTION

Capture locals. If the calculated locals are different from the expected values, generate a method stub containing an exception. This will allow normal execution to continue unless the callback is encountered.

### Method Detail

#### values

    public static LocalCapture[] 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 (LocalCapture c : LocalCapture.values())
        System.out.println(c);

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

#### valueOf

    public static LocalCapture valueOf​(java.lang.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:
  `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
  `java.lang.NullPointerException` - if the argument is null