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>,java.lang.constant.Constable
- Enclosing class:
- MixinEnvironment
public static enum MixinEnvironment.Option extends java.lang.Enum<MixinEnvironment.Option>
Mixin options
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>> -
Enum Constant Summary
Enum Constants Enum Constant Description CHECK_ALLEnable all checksCHECK_IMPLEMENTSChecks that all declared interface methods are implemented on a class after mixin application.CHECK_IMPLEMENTS_STRICTIf interface check is enabled, "strict mode" (default) applies the implementation check even to abstract target classes.DEBUG_ALLEnable all debugging optionsDEBUG_EXPORTEnable post-mixin class export.DEBUG_EXPORT_DECOMPILEAllow fernflower to be disabled even if it is found on the classpathDEBUG_EXPORT_DECOMPILE_MERGESIGNATURESBy default, if the runtime export decompiler is active, mixin generic signatures are merged into target classes.DEBUG_EXPORT_DECOMPILE_THREADEDRun fernflower in a separate thread.DEBUG_EXPORT_FILTERExport filter, if omitted allows all transformed classes to be exported.DEBUG_INJECTORSElevates failed injections to an error condition, seeInject.expect()for detailsDEBUG_PROFILEREnable the performance profiler for all mixin operations (normally it is only enabled during mixin prepare operations)DEBUG_STRICTEnable strict checksDEBUG_TARGETSEnable strict checking for mixin targetsDEBUG_UNIQUEIf false (default),Uniquepublic methods merely raise a warning when encountered and are not merged into the target.DEBUG_VERBOSEEnable verbose mixin logging (elevates all DEBUG level messages to INFO level)DEBUG_VERIFYRun 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_LEVELDefault compatibility level to operate atDISABLE_REFMAPDisable refmap when requiredDUMP_TARGET_ON_FAILUREDumps the bytecode for the target class to disk when mixin application failsENVIRONMENTParent for environment settingsHOT_SWAPEnables the hot-swap agentIGNORE_CONSTRAINTSIgnore all constraints on mixin annotations, output warnings insteadIGNORE_REQUIREDGlobally ignore the "required" attribute of all configurationsINITIALISER_INJECTION_MODEBehaviour for initialiser injections, current supported options are "default" and "safe"OBFUSCATION_TYPEForce refmap obf type when requiredREFMAP_REMAPRather than disabling the refMap, you may wish to remap existing refMaps at runtime.REFMAP_REMAP_ALLOW_PERMISSIVEWhen 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_RESOURCEIf 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_ENVWhen using mixin.env.refMapRemappingFile, this setting overrides the default source environment (searge).SHIFT_BY_VIOLATION_BEHAVIOURBehaviour when the maximum definedAt.by()value is exceeded in a mixin. -
Method Summary
Modifier and Type Method Description java.lang.StringtoString()static MixinEnvironment.OptionvalueOf(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, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
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"
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Enum<MixinEnvironment.Option>
-