Package org.spongepowered.asm.mixin

## Enum MixinEnvironment.Feature

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

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

Enclosing class:
  MixinEnvironment

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

Mixin features which can be specified in mixin configs as required for the config to be valid. No support for backward compatibility but should help in the future to allow mixin configs to specify the features they require rather than relying purely on minVersion. Only applies to features added in version 0.8.6 and higher.

### Enum Constant Summary

Enum Constants
`INJECTORS_IN_INTERFACE_MIXINS` Support for the use of injector annotations in interface mixins
`UNSAFE_INJECTION` Supports the `unsafe` flag on @At annotations to facilitate hassle-free constructor injections.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static boolean` `exists​(java.lang.String featureId)` Check whether a particular feature exists in this mixin version, even if it's not currently available
`static MixinEnvironment.Feature` `get​(java.lang.String featureId)` Convenience function which returns a Feature constant based on the feature id, but returns null instead of throwing an exception.
`static boolean` `isActive​(java.lang.String featureId)` Check whether a particular feature is available and enabled
`boolean` `isAvailable()` Get whether this feature is available in the current runtime environment
`boolean` `isEnabled()` Get whether this feature is supported in the current environment and compatibility level
`static MixinEnvironment.Feature` `valueOf​(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static MixinEnvironment.Feature[]` `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

#### UNSAFE_INJECTION

    public static final MixinEnvironment.Feature UNSAFE_INJECTION

Supports the `unsafe` flag on @At annotations to facilitate hassle-free constructor injections.

#### INJECTORS_IN_INTERFACE_MIXINS

    public static final MixinEnvironment.Feature INJECTORS_IN_INTERFACE_MIXINS

Support for the use of injector annotations in interface mixins

### Method Detail

#### values

    public static MixinEnvironment.Feature[] 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.Feature c : MixinEnvironment.Feature.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.Feature 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

#### isAvailable

    public boolean isAvailable()

Get whether this feature is available in the current runtime environment

#### isEnabled

    public boolean isEnabled()

Get whether this feature is supported in the current environment and compatibility level

#### get

    public static MixinEnvironment.Feature get​(java.lang.String featureId)

Convenience function which returns a Feature constant based on the feature id, but returns null instead of throwing an exception.

Parameters:
  `featureId` - Feature ID (enum constant name) to check for
Returns:
  Feature or null

#### exists

    public static boolean exists​(java.lang.String featureId)

Check whether a particular feature exists in this mixin version, even if it's not currently available

Parameters:
  `featureId` - Feature ID (enum constant name) to check for
Returns:
  true if the feature exists

#### isActive

    public static boolean isActive​(java.lang.String featureId)

Check whether a particular feature is available and enabled

Parameters:
  `featureId` - Feature ID (enum constant name) to check for
Returns:
  true if the feature is currently available