Package org.spongepowered.asm.mixin
Enum Class MixinEnvironment.Option
- All Implemented Interfaces:
Serializable,Comparable<MixinEnvironment.Option>,Constable
- Enclosing class:
MixinEnvironment
Mixin options
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEnable all checksChecks that all declared interface methods are implemented on a class after mixin application.If interface check is enabled, "strict mode" (default) applies the implementation check even to abstract target classes.Tunable for the Mixin ClassReader behaviour, setting this option to true will cause the Mixin ClassReader to read mixin bytecode withClassReader.EXPAND_FRAMESflag which restores the behaviour from versions 0.8.6 and below, newer versions default to 0.Enable all debugging optionsEnable post-mixin class export.Allow fernflower to be disabled even if it is found on the classpathBy default, if the runtime export decompiler is active, mixin generic signatures are merged into target classes.Run fernflower in a separate thread.Export filter, if omitted allows all transformed classes to be exported.Elevates failed injections to an error condition, seeInject.expect()for detailsEnable the performance profiler for all mixin operations (normally it is only enabled during mixin prepare operations)Enable strict checksEnable strict checking for mixin targetsIf false (default),Uniquepublic methods merely raise a warning when encountered and are not merged into the target.Enable verbose mixin logging (elevates all DEBUG level messages to INFO level)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 exceptionsDefault compatibility level to operate atDisable refmap when requiredDumps the bytecode for the target class to disk when mixin application failsParent for environment settingsEnables the hot-swap agentIgnore all constraints on mixin annotations, output warnings insteadGlobally ignore the "required" attribute of all configurationsBehaviour for initialiser injections, current supported options are "default" and "safe"Force refmap obf type when requiredRather than disabling the refMap, you may wish to remap existing refMaps at runtime.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.If mixin.env.remapRefMap is enabled, this setting can be used to override the name of the SRG file to read mappings from.When using mixin.env.refMapRemappingFile, this setting overrides the default source environment (searge).Behaviour when the maximum definedAt.by()value is exceeded in a mixin.Parent for tunable settings -
Method Summary
Modifier and TypeMethodDescriptiontoString()static MixinEnvironment.OptionReturns the enum constant of this class with the specified name.static MixinEnvironment.Option[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEBUG_ALL
Enable all debugging options -
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
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
Allow fernflower to be disabled even if it is found on the classpath -
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
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
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
Enable verbose mixin logging (elevates all DEBUG level messages to INFO level) -
DEBUG_INJECTORS
Elevates failed injections to an error condition, seeInject.expect()for details -
DEBUG_STRICT
Enable strict checks -
DEBUG_UNIQUE
If false (default),Uniquepublic methods merely raise a warning when encountered and are not merged into the target. If true, an exception is thrown instead -
DEBUG_TARGETS
Enable strict checking for mixin targets -
DEBUG_PROFILER
Enable the performance profiler for all mixin operations (normally it is only enabled during mixin prepare operations) -
DUMP_TARGET_ON_FAILURE
Dumps the bytecode for the target class to disk when mixin application fails -
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. Setting this option to false causes abstract targets to be skipped when generating the implementation report. -
IGNORE_CONSTRAINTS
Ignore all constraints on mixin annotations, output warnings instead -
HOT_SWAP
Enables the hot-swap agent -
ENVIRONMENT
Parent for environment settings -
OBFUSCATION_TYPE
Force refmap obf type when required -
DISABLE_REFMAP
Disable refmap when required -
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
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
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
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
Globally ignore the "required" attribute of all configurations -
DEFAULT_COMPATIBILITY_LEVEL
Default compatibility level to operate at -
SHIFT_BY_VIOLATION_BEHAVIOUR
Behaviour when the maximum definedAt.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
Behaviour for initialiser injections, current supported options are "default" and "safe" -
TUNABLE
Parent for tunable settings -
CLASSREADER_EXPAND_FRAMES
Tunable for the Mixin ClassReader behaviour, setting this option to true will cause the Mixin ClassReader to read mixin bytecode withClassReader.EXPAND_FRAMESflag which restores the behaviour from versions 0.8.6 and below, newer versions default to 0.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<MixinEnvironment.Option>
-