Package org.spongepowered.asm.mixin.injection

## Enum At.Shift

- java.lang.Object
- - java.lang.Enum<At.Shift>
  - - org.spongepowered.asm.mixin.injection.At.Shift

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

Enclosing class:
  At

    public static enum At.Shift
    extends java.lang.Enum<At.Shift>

An enumeration defining the available modes of shifting as consumed by `At.shift()`.

### Enum Constant Summary

Enum Constants
`AFTER` Use the instruction that is immediately after the instruction selected by the injection point selector defined by `At.value()` (with the corresponding injection point constraints).
`BEFORE` Use the instruction that is immediately before the instruction selected by the injection point selector defined by `At.value()` (with the corresponding injection point constraints).

`BY`

Use an instruction that is immediately before n instructions after the instruction selected by the injection point selector defined by `At.value()` (with the corresponding injection point constraints) if `At.by()` is a positive value, otherwise select the instruction immediately before n instructions before the instruction selected by the injection point selector, with n being the absolute value of `At.by()`.

`NONE` No shift.

### Method Summary

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

#### NONE

    public static final At.Shift NONE

No shift. The instruction defined by the injection point selector of the `At` will be used as-is.

#### BEFORE

    public static final At.Shift BEFORE

Use the instruction that is immediately before the instruction selected by the injection point selector defined by `At.value()` (with the corresponding injection point constraints).

#### AFTER

    public static final At.Shift AFTER

Use the instruction that is immediately after the instruction selected by the injection point selector defined by `At.value()` (with the corresponding injection point constraints).

#### BY

    public static final At.Shift BY

Use an instruction that is immediately before n instructions after the instruction selected by the injection point selector defined by `At.value()` (with the corresponding injection point constraints) if `At.by()` is a positive value, otherwise select the instruction immediately before n instructions before the instruction selected by the injection point selector, with n being the absolute value of `At.by()`.

Simplified, using this `At.Shift` mode results in arbitrary shifts by n instructions (for n > 0, the shift is forwards while for n < 0 the shift is backwards. For n = 0 no shift occurs). This n is defined using `At.by()` (default value for that property is 0).

Although permissible when using micromixin at this point in time, other mixin implementations (and potentially future iterations of micromixin) may produce warnings or application failures when using `BY` in combination with a `At.by()` that is a very large value. As a rule of thumb, an `At.by()` smaller than -3 or larger than 3 are to be avoided. Reason for this is that `At.by()` is rather blind, enabling the possibility of writing injection points that are more unstable than they actually need to be.

### Method Detail

#### values

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

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

#### valueOf

    public static At.Shift 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