Package org.spongepowered.asm.mixin.transformer.ext

## Class Extensions

- java.lang.Object
- - org.spongepowered.asm.mixin.transformer.ext.Extensions

All Implemented Interfaces:
  `IExtensionRegistry`

    public final class Extensions
    extends java.lang.Object
    implements IExtensionRegistry

Mixin transformer extensions and common modules such as class generators

### Constructor Summary

Constructors
`Extensions​(ISyntheticClassRegistry syntheticClassRegistry)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add​(IClassGenerator generator)` Add a new generator to the mixin extensions
`void` `add​(IExtension extension)` Add a new transformer extension
`void` `export​(MixinEnvironment env, java.lang.String name, boolean force, org.objectweb.asm.tree.ClassNode classNode)` Export class bytecode to disk
`java.util.List<IExtension>` `getActiveExtensions()` Get all active extensions
`<T extends IExtension> T` `getExtension​(java.lang.Class<? extends IExtension> extensionClass)` Get a specific extension
`java.util.List<IExtension>` `getExtensions()` Get all extensions
`<T extends IClassGenerator> T` `getGenerator​(java.lang.Class<? extends IClassGenerator> generatorClass)`
`java.util.List<IClassGenerator>` `getGenerators()` Get all active generators
`ISyntheticClassRegistry` `getSyntheticClassRegistry()` Get the synthetic class registry
`void` `postApply​(ITargetClassContext context)` Process tasks after mixin application
`void` `preApply​(ITargetClassContext context)` Process tasks before mixin application
`void` `select​(MixinEnvironment environment)` Selectively activate extensions based on the current environment

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Extensions

    public Extensions​(ISyntheticClassRegistry syntheticClassRegistry)

### Method Detail

#### add

    public void add​(IExtension extension)

Add a new transformer extension

Parameters:
  `extension` - extension to add

#### getExtensions

    public java.util.List<IExtension> getExtensions()

Description copied from interface: `IExtensionRegistry`
Get all extensions

Specified by:
  `getExtensions` in interface `IExtensionRegistry`

#### getActiveExtensions

    public java.util.List<IExtension> getActiveExtensions()

Description copied from interface: `IExtensionRegistry`
Get all active extensions

Specified by:
  `getActiveExtensions` in interface `IExtensionRegistry`

#### getExtension

    public <T extends IExtension> T getExtension​(java.lang.Class<? extends IExtension> extensionClass)

Description copied from interface: `IExtensionRegistry`
Get a specific extension

Specified by:
  `getExtension` in interface `IExtensionRegistry`
Type Parameters:
  `T` - extension type
Parameters:
  `extensionClass` - extension class to look up
Returns:
  extension instance or null

#### getSyntheticClassRegistry

    public ISyntheticClassRegistry getSyntheticClassRegistry()

Description copied from interface: `IExtensionRegistry`
Get the synthetic class registry

Specified by:
  `getSyntheticClassRegistry` in interface `IExtensionRegistry`

#### select

    public void select​(MixinEnvironment environment)

Selectively activate extensions based on the current environment

Parameters:
  `environment` - current environment

#### preApply

    public void preApply​(ITargetClassContext context)

Process tasks before mixin application

Parameters:
  `context` - Target class context

#### postApply

    public void postApply​(ITargetClassContext context)

Process tasks after mixin application

Parameters:
  `context` - Target class context

#### export

    public void export​(MixinEnvironment env,
                       java.lang.String name,
                       boolean force,
                       org.objectweb.asm.tree.ClassNode classNode)

Export class bytecode to disk

Parameters:
  `env` - Environment
  `name` - Class name
  `force` - True to export even if the current environment settings would normally disable it
  `classNode` - Class to export

#### add

    public void add​(IClassGenerator generator)

Add a new generator to the mixin extensions

Parameters:
  `generator` - generator to add

#### getGenerators

    public java.util.List<IClassGenerator> getGenerators()

Get all active generators

#### getGenerator

    public <T extends IClassGenerator> T getGenerator​(java.lang.Class<? extends IClassGenerator> generatorClass)

Type Parameters:
  `T` - genenerator class for duck typing
Parameters:
  `generatorClass` - generator class or interface to look up
Returns:
  generator