Package org.spongepowered.asm.mixin

## Enum MixinEnvironment.Option

- java.lang.Object
- - java.lang.Enum<MixinEnvironment.Option>
  - - org.spongepowered.asm.mixin.MixinEnvironment.Option

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Comparable<MixinEnvironment.Option>`
  Enclosing class:
    MixinEnvironment

      public static enum MixinEnvironment.Option
      extends java.lang.Enum<MixinEnvironment.Option>

  Mixin options

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `CHECK_ALL` | Enable all checks
    `CHECK_IMPLEMENTS` | Checks that all declared interface methods are implemented on a class after mixin application.
    `CHECK_IMPLEMENTS_STRICT` | If interface check is enabled, "strict mode" (default) applies the implementation check even to abstract target classes.
    `CLASSREADER_EXPAND_FRAMES` | Tunable for the Mixin ClassReader behaviour, setting this option to `true` will cause the Mixin ClassReader to read mixin bytecode with `ClassReader.EXPAND_FRAMES` flag which restores the behaviour from versions 0.8.6 and below, newer versions default to 0.
    `DEBUG_ALL` | Enable all debugging options
    `DEBUG_EXPORT` | Enable post-mixin class export.
    `DEBUG_EXPORT_DECOMPILE` | Allow fernflower to be disabled even if it is found on the classpath
    `DEBUG_EXPORT_DECOMPILE_MERGESIGNATURES` | By default, if the runtime export decompiler is active, mixin generic signatures are merged into target classes.
    `DEBUG_EXPORT_DECOMPILE_THREADED` | Run fernflower in a separate thread.
    `DEBUG_EXPORT_FILTER` | Export filter, if omitted allows all transformed classes to be exported.
    `DEBUG_INJECTORS` | Elevates failed injections to an error condition, see `Inject.expect()` for details
    `DEBUG_PROFILER` | Enable the performance profiler for all mixin operations (normally it is only enabled during mixin prepare operations)
    `DEBUG_STRICT` | Enable strict checks
    `DEBUG_TARGETS` | Enable strict checking for mixin targets
    `DEBUG_UNIQUE` | If false (default), `Unique` public methods merely raise a warning when encountered and are not merged into the target.
    `DEBUG_VERBOSE` | Enable verbose mixin logging (elevates all DEBUG level messages to INFO level)
    `DEBUG_VERIFY` | Run the CheckClassAdapter on all classes after mixins are applied, also enables stricter checks on mixins for use at dev-time, promotes some warning-level messages to exceptions
    `DEFAULT_COMPATIBILITY_LEVEL` | Default compatibility level to operate at
    `DISABLE_REFMAP` | Disable refmap when required
    `DUMP_TARGET_ON_FAILURE` | Dumps the bytecode for the target class to disk when mixin application fails
    `ENVIRONMENT` | Parent for environment settings
    `HOT_SWAP` | Enables the hot-swap agent
    `IGNORE_CONSTRAINTS` | Ignore all constraints on mixin annotations, output warnings instead
    `IGNORE_REQUIRED` | Globally ignore the "required" attribute of all configurations
    `INITIALISER_INJECTION_MODE` | Behaviour for initialiser injections, current supported options are "default" and "safe"
    `OBFUSCATION_TYPE` | Force refmap obf type when required
    `REFMAP_REMAP` | Rather than disabling the refMap, you may wish to remap existing refMaps at runtime.
    `REFMAP_REMAP_ALLOW_PERMISSIVE` | When `mixin.env.remapRefMap` is enabled and a refmap is available for a mixin config, certain injection points are allowed to fail over to a "permissive" match which ignores the member descriptor in the refmap.
    `REFMAP_REMAP_RESOURCE` | If `mixin.env.remapRefMap` is enabled, this setting can be used to override the name of the SRG file to read mappings from.
    `REFMAP_REMAP_SOURCE_ENV` | When using `mixin.env.refMapRemappingFile`, this setting overrides the default source environment (searge).
    `SHIFT_BY_VIOLATION_BEHAVIOUR` | Behaviour when the maximum defined `At.by()` value is exceeded in a mixin.
    `TUNABLE` | Parent for tunable settings

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `toString()` |
    `static MixinEnvironment.Option` | `valueOf​(java.lang.String name)` | Returns the enum constant of this type with the specified name.
    `static MixinEnvironment.Option[]` | `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, valueOf`

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

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

- - ### Enum Constant Detail

    - #### DEBUG_ALL

          public static final MixinEnvironment.Option DEBUG_ALL

      Enable all debugging options

    - #### DEBUG_EXPORT

          public static final MixinEnvironment.Option DEBUG_EXPORT

      Enable post-mixin class export. This causes all classes to be written to the .mixin.out directory within the runtime directory after mixins are applied, for debugging purposes.

    - #### DEBUG_EXPORT_FILTER

          public static final MixinEnvironment.Option DEBUG_EXPORT_FILTER

      Export filter, if omitted allows all transformed classes to be exported. If specified, acts as a filter for class names to export and only matching classes will be exported. This is useful when using Fernflower as exporting can be otherwise very slow. The following wildcards are allowed:
      *
        Matches one or more characters except dot (.)
      **
        Matches any number of characters
      ?
        Matches exactly one character

    - #### DEBUG_EXPORT_DECOMPILE

          public static final MixinEnvironment.Option DEBUG_EXPORT_DECOMPILE

      Allow fernflower to be disabled even if it is found on the classpath

    - #### DEBUG_EXPORT_DECOMPILE_THREADED

          public static final MixinEnvironment.Option DEBUG_EXPORT_DECOMPILE_THREADED

      Run fernflower in a separate thread. In general this will allow export to impact startup time much less (decompiling normally adds about 20% to load times) with the trade-off that crashes may lead to undecompiled exports.

    - #### DEBUG_EXPORT_DECOMPILE_MERGESIGNATURES

          public static final MixinEnvironment.Option DEBUG_EXPORT_DECOMPILE_MERGESIGNATURES

      By default, if the runtime export decompiler is active, mixin generic signatures are merged into target classes. However this can cause problems with some runtime subsystems which attempt to reify generics using the signature data. Set this option to `false` to disable generic signature merging.

    - #### DEBUG_VERIFY

          public static final MixinEnvironment.Option DEBUG_VERIFY

      Run the CheckClassAdapter on all classes after mixins are applied, also enables stricter checks on mixins for use at dev-time, promotes some warning-level messages to exceptions

    - #### DEBUG_VERBOSE

          public static final MixinEnvironment.Option DEBUG_VERBOSE

      Enable verbose mixin logging (elevates all DEBUG level messages to INFO level)

    - #### DEBUG_INJECTORS

          public static final MixinEnvironment.Option DEBUG_INJECTORS

      Elevates failed injections to an error condition, see `Inject.expect()` for details

    - #### DEBUG_STRICT

          public static final MixinEnvironment.Option DEBUG_STRICT

      Enable strict checks

    - #### DEBUG_UNIQUE

          public static final MixinEnvironment.Option DEBUG_UNIQUE

      If false (default), `Unique` public methods merely raise a warning when encountered and are not merged into the target. If true, an exception is thrown instead

    - #### DEBUG_TARGETS

          public static final MixinEnvironment.Option DEBUG_TARGETS

      Enable strict checking for mixin targets

    - #### DEBUG_PROFILER

          public static final MixinEnvironment.Option DEBUG_PROFILER

      Enable the performance profiler for all mixin operations (normally it is only enabled during mixin prepare operations)

    - #### DUMP_TARGET_ON_FAILURE

          public static final MixinEnvironment.Option DUMP_TARGET_ON_FAILURE

      Dumps the bytecode for the target class to disk when mixin application fails

    - #### CHECK_ALL

          public static final MixinEnvironment.Option CHECK_ALL

      Enable all checks

    - #### CHECK_IMPLEMENTS

          public static final MixinEnvironment.Option CHECK_IMPLEMENTS

      Checks that all declared interface methods are implemented on a class after mixin application.

    - #### CHECK_IMPLEMENTS_STRICT

          public static final MixinEnvironment.Option CHECK_IMPLEMENTS_STRICT

      If interface check is enabled, "strict mode" (default) applies the implementation check even to abstract target classes. Setting this option to `false` causes abstract targets to be skipped when generating the implementation report.

    - #### IGNORE_CONSTRAINTS

          public static final MixinEnvironment.Option IGNORE_CONSTRAINTS

      Ignore all constraints on mixin annotations, output warnings instead

    - #### HOT_SWAP

          public static final MixinEnvironment.Option HOT_SWAP

      Enables the hot-swap agent

    - #### ENVIRONMENT

          public static final MixinEnvironment.Option ENVIRONMENT

      Parent for environment settings

    - #### OBFUSCATION_TYPE

          public static final MixinEnvironment.Option OBFUSCATION_TYPE

      Force refmap obf type when required

    - #### DISABLE_REFMAP

          public static final MixinEnvironment.Option DISABLE_REFMAP

      Disable refmap when required

    - #### REFMAP_REMAP

          public static final MixinEnvironment.Option REFMAP_REMAP

      Rather than disabling the refMap, you may wish to remap existing refMaps at runtime. This can be achieved by setting this property and supplying values for `mixin.env.refMapRemappingFile` and `mixin.env.refMapRemappingEnv`. Though those properties can be ignored if starting via `GradleStart` (this property is also automatically enabled if loading via GradleStart).

    - #### REFMAP_REMAP_RESOURCE

          public static final MixinEnvironment.Option REFMAP_REMAP_RESOURCE

      If `mixin.env.remapRefMap` is enabled, this setting can be used to override the name of the SRG file to read mappings from. The mappings must have a source type of `searge` and a target type matching the current development environment. If the source type is not `searge` then the `mixin.env.refMapRemappingEnv` should be set to the correct source environment type.

    - #### REFMAP_REMAP_SOURCE_ENV

          public static final MixinEnvironment.Option REFMAP_REMAP_SOURCE_ENV

      When using `mixin.env.refMapRemappingFile`, this setting overrides the default source environment (searge). However note that the specified environment type must exist in the orignal refmap.

    - #### REFMAP_REMAP_ALLOW_PERMISSIVE

          public static final MixinEnvironment.Option REFMAP_REMAP_ALLOW_PERMISSIVE

      When `mixin.env.remapRefMap` is enabled and a refmap is available for a mixin config, certain injection points are allowed to fail over to a "permissive" match which ignores the member descriptor in the refmap. To disable this behaviour, set this property to `false`.

    - #### IGNORE_REQUIRED

          public static final MixinEnvironment.Option IGNORE_REQUIRED

      Globally ignore the "required" attribute of all configurations

    - #### DEFAULT_COMPATIBILITY_LEVEL

          public static final MixinEnvironment.Option DEFAULT_COMPATIBILITY_LEVEL

      Default compatibility level to operate at

    - #### SHIFT_BY_VIOLATION_BEHAVIOUR

          public static final MixinEnvironment.Option SHIFT_BY_VIOLATION_BEHAVIOUR

      Behaviour when the maximum defined `At.by()` value is exceeded in a mixin. Currently the behaviour is to `warn`. In later versions of Mixin this may be promoted to `error`.

      Available values for this option are:

      ignore
        Pre-0.7 behaviour, no action is taken when a violation is encountered
      warn
        Current behaviour, a `WARN`-level message is raised for violations
      error
        Violations throw an exception

    - #### INITIALISER_INJECTION_MODE

          public static final MixinEnvironment.Option INITIALISER_INJECTION_MODE

      Behaviour for initialiser injections, current supported options are "default" and "safe"

    - #### TUNABLE

          public static final MixinEnvironment.Option TUNABLE

      Parent for tunable settings

    - #### CLASSREADER_EXPAND_FRAMES

          public static final MixinEnvironment.Option CLASSREADER_EXPAND_FRAMES

      Tunable for the Mixin ClassReader behaviour, setting this option to `true` will cause the Mixin ClassReader to read mixin bytecode with `ClassReader.EXPAND_FRAMES` flag which restores the behaviour from versions 0.8.6 and below, newer versions default to 0.

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

          public static MixinEnvironment.Option 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

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Enum<MixinEnvironment.Option>`