Class Extensions
java.lang.Object
org.spongepowered.asm.mixin.transformer.ext.Extensions
- All Implemented Interfaces:
IExtensionRegistry
Mixin transformer extensions and common modules such as class generators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(IClassGenerator generator) Add a new generator to the mixin extensionsvoidadd(IExtension extension) Add a new transformer extensionvoidexport(MixinEnvironment env, String name, boolean force, org.objectweb.asm.tree.ClassNode classNode) Export class bytecode to diskGet all active extensions<T extends IExtension>
TgetExtension(Class<? extends IExtension> extensionClass) Get a specific extensionGet all extensions<T extends IClassGenerator>
TgetGenerator(Class<? extends IClassGenerator> generatorClass) Get all active generatorsGet the synthetic class registryvoidpostApply(ITargetClassContext context) Process tasks after mixin applicationvoidpreApply(ITargetClassContext context) Process tasks before mixin applicationvoidselect(MixinEnvironment environment) Selectively activate extensions based on the current environment
-
Constructor Details
-
Extensions
-
-
Method Details
-
add
Add a new transformer extension- Parameters:
extension- extension to add
-
getExtensions
Description copied from interface:IExtensionRegistryGet all extensions- Specified by:
getExtensionsin interfaceIExtensionRegistry
-
getActiveExtensions
Description copied from interface:IExtensionRegistryGet all active extensions- Specified by:
getActiveExtensionsin interfaceIExtensionRegistry
-
getExtension
Description copied from interface:IExtensionRegistryGet a specific extension- Specified by:
getExtensionin interfaceIExtensionRegistry- Type Parameters:
T- extension type- Parameters:
extensionClass- extension class to look up- Returns:
- extension instance or null
-
getSyntheticClassRegistry
Description copied from interface:IExtensionRegistryGet the synthetic class registry- Specified by:
getSyntheticClassRegistryin interfaceIExtensionRegistry
-
select
Selectively activate extensions based on the current environment- Parameters:
environment- current environment
-
preApply
Process tasks before mixin application- Parameters:
context- Target class context
-
postApply
Process tasks after mixin application- Parameters:
context- Target class context
-
export
public void export(MixinEnvironment env, String name, boolean force, org.objectweb.asm.tree.ClassNode classNode) Export class bytecode to disk- Parameters:
env- Environmentname- Class nameforce- True to export even if the current environment settings would normally disable itclassNode- Class to export
-
add
Add a new generator to the mixin extensions- Parameters:
generator- generator to add
-
getGenerators
Get all active generators -
getGenerator
- Type Parameters:
T- genenerator class for duck typing- Parameters:
generatorClass- generator class or interface to look up- Returns:
- generator
-