Package org.spongepowered.asm.mixin
Class Mixins
java.lang.Object
org.spongepowered.asm.mixin.Mixins
Entry point for registering global mixin resources. Compatibility with
pre-0.6 versions is maintained via the methods on
MixinEnvironment
delegating to the methods here.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddConfiguration(String configFile) Add a mixin configuration resourcestatic voidaddConfiguration(String configFile, IMixinConfigSource source) Add a mixin configuration resourcestatic voidaddConfigurations(String... configFiles) Add multiple configurationsstatic voidaddConfigurations(String[] configFiles, IMixinConfigSource source) Add multiple configurationsGet current pending configs set, only configs which have yet to be consumed are present in this setGet current error handlersstatic Set<IMixinInfo> getMixinsForClass(String className) Get information about mixins applied to the specified class in the current session.static intGet the number of "unvisited" configurations available.static voidregisterErrorHandlerClass(String handlerName) Register a gloabl error handler class
-
Method Details
-
addConfigurations
Add multiple configurations- Parameters:
configFiles- config resources to add
-
addConfigurations
Add multiple configurations- Parameters:
configFiles- config resources to addsource- source of the configuration resource
-
addConfiguration
Add a mixin configuration resource- Parameters:
configFile- path to configuration resource
-
addConfiguration
Add a mixin configuration resource- Parameters:
configFile- path to configuration resourcesource- source of the configuration resource
-
getUnvisitedCount
public static int getUnvisitedCount()Get the number of "unvisited" configurations available. This is the number of configurations which have been added since the last selection attempt.If the transformer has already entered a phase but no mixins have yet been applied, it is safe to visit any additional configs which were registered in the mean time and may wish to apply to the current phase. This is particularly true during the PREINIT phase, which by necessity must start as soon as the first class is transformed after bootstrapping, but may not have any valid mixins until later in the actual preinit process due to the order in which things are discovered.
- Returns:
- unvisited config count
-
getConfigs
Get current pending configs set, only configs which have yet to be consumed are present in this set -
getMixinsForClass
Get information about mixins applied to the specified class in the current session.- Parameters:
className- Name of class to retrieve mixins for- Returns:
- Set of applied mixins
-
registerErrorHandlerClass
Register a gloabl error handler class- Parameters:
handlerName- Fully qualified class name
-
getErrorHandlerClasses
Get current error handlers
-