Package org.spongepowered.asm.service

## Class MixinServiceAbstract

- java.lang.Object
- - org.spongepowered.asm.service.MixinServiceAbstract

- All Implemented Interfaces:
    `IMixinService`

      public abstract class MixinServiceAbstract
      extends java.lang.Object
      implements IMixinService

  Mixin Service base class

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static java.lang.String` | `LAUNCH_PACKAGE` |
    `protected ReEntranceLock` | `lock` | Transformer re-entrance lock, shared between the mixin transformer and the metadata service
    `protected static java.lang.String` | `MIXIN_PACKAGE` |
    `protected static java.lang.String` | `SERVICE_PACKAGE` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MixinServiceAbstract()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `beginPhase()` | Called whenever a new phase is started
    `void` | `checkEnv​(java.lang.Object bootSource)` | Check whether the supplied object is a valid boot source for mixin environment
    `protected ILogger` | `createLogger​(java.lang.String name)` |
    `protected void` | `getContainersFromAgents​(com.google.common.collect.ImmutableList.Builder<IContainerHandle> list)` | Collect mixin containers from platform agents
    `MixinEnvironment.Phase` | `getInitialPhase()` | Get the initial subsystem phase
    `protected <T extends IMixinInternal> T` | `getInternal​(java.lang.Class<T> type)` |
    `ILogger` | `getLogger​(java.lang.String name)` | Retrieve a logger adapter with the specified name (id).
    `MixinEnvironment.CompatibilityLevel` | `getMaxCompatibilityLevel()` | Get the maximum compatibility level supported by this service.
    `MixinEnvironment.CompatibilityLevel` | `getMinCompatibilityLevel()` | Get the minimum compatibility level supported by this service.
    `java.util.Collection<IContainerHandle>` | `getMixinContainers()` | Get a collection of containers in the current environment which contain mixins we should process
    `ReEntranceLock` | `getReEntranceLock()` | Get the transformer re-entrance lock for this service, the transformer uses this lock to track transformer re-entrance when co-operative load and transform is performed by the service.
    `java.lang.String` | `getSideName()` | Get the detected side name for this environment
    `void` | `init()` | Called at the end of subsystem boot
    `void` | `offer​(IMixinInternal internal)` | Called when the subsystem is offering internal components to the service, the service can determine whether to retain or ignore the component based on its own requirements.
    `void` | `prepare()` | Called at subsystem boot
    `void` | `unwire()` | Deprecated. temporary
    `void` | `wire​(MixinEnvironment.Phase phase, IConsumer<MixinEnvironment.Phase> phaseConsumer)` | Deprecated. temporary

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

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

    - ### Methods inherited from interface org.spongepowered.asm.service.IMixinService

      `getAuditTrail, getBytecodeProvider, getClassProvider, getClassTracker, getName, getPlatformAgents, getPrimaryContainer, getResourceAsStream, getTransformerProvider, isValid`

- - ### Field Detail

    - #### LAUNCH_PACKAGE

          protected static final java.lang.String LAUNCH_PACKAGE

      See Also:
        Constant Field Values

    - #### MIXIN_PACKAGE

          protected static final java.lang.String MIXIN_PACKAGE

      See Also:
        Constant Field Values

    - #### SERVICE_PACKAGE

          protected static final java.lang.String SERVICE_PACKAGE

      See Also:
        Constant Field Values

    - #### lock

          protected final ReEntranceLock lock

      Transformer re-entrance lock, shared between the mixin transformer and the metadata service

  - ### Constructor Detail

    - #### MixinServiceAbstract

          public MixinServiceAbstract()

  - ### Method Detail

    - #### prepare

          public void prepare()

      Description copied from interface: `IMixinService`
      Called at subsystem boot
      Specified by:
        `prepare` in interface `IMixinService`

    - #### getInitialPhase

          public MixinEnvironment.Phase getInitialPhase()

      Description copied from interface: `IMixinService`
      Get the initial subsystem phase
      Specified by:
        `getInitialPhase` in interface `IMixinService`

    - #### getMinCompatibilityLevel

          public MixinEnvironment.CompatibilityLevel getMinCompatibilityLevel()

      Description copied from interface: `IMixinService`
      Get the minimum compatibility level supported by this service. Can return `null` if the service has no specific minimum compatibility level, however if a value is returned, it will be used as the minimum compatibility level and no lower levels will be supported.
      Specified by:
        `getMinCompatibilityLevel` in interface `IMixinService`
      Returns:
        minimum supported `MixinEnvironment.CompatibilityLevel` or null

    - #### getMaxCompatibilityLevel

          public MixinEnvironment.CompatibilityLevel getMaxCompatibilityLevel()

      Description copied from interface: `IMixinService`
      Get the maximum compatibility level supported by this service. Can return `null` if the service has no specific maximum compatibility level. If a value is returned, a warning will be raised if a configuration attempts to se a higher compatibility level.
      Specified by:
        `getMaxCompatibilityLevel` in interface `IMixinService`
      Returns:
        minimum supported `MixinEnvironment.CompatibilityLevel` or null

    - #### offer

          public void offer​(IMixinInternal internal)

      Description copied from interface: `IMixinService`
      Called when the subsystem is offering internal components to the service, the service can determine whether to retain or ignore the component based on its own requirements.
      Specified by:
        `offer` in interface `IMixinService`
      Parameters:
        `internal` - Internal component being offered

    - #### getInternal

          protected final <T extends IMixinInternal> T getInternal​(java.lang.Class<T> type)

    - #### init

          public void init()

      Description copied from interface: `IMixinService`
      Called at the end of subsystem boot
      Specified by:
        `init` in interface `IMixinService`

    - #### beginPhase

          public void beginPhase()

      Description copied from interface: `IMixinService`
      Called whenever a new phase is started
      Specified by:
        `beginPhase` in interface `IMixinService`

    - #### checkEnv

          public void checkEnv​(java.lang.Object bootSource)

      Description copied from interface: `IMixinService`
      Check whether the supplied object is a valid boot source for mixin environment
      Specified by:
        `checkEnv` in interface `IMixinService`
      Parameters:
        `bootSource` - boot source

    - #### getReEntranceLock

          public ReEntranceLock getReEntranceLock()

      Description copied from interface: `IMixinService`
      Get the transformer re-entrance lock for this service, the transformer uses this lock to track transformer re-entrance when co-operative load and transform is performed by the service.
      Specified by:
        `getReEntranceLock` in interface `IMixinService`

    - #### getMixinContainers

          public java.util.Collection<IContainerHandle> getMixinContainers()

      Description copied from interface: `IMixinService`
      Get a collection of containers in the current environment which contain mixins we should process
      Specified by:
        `getMixinContainers` in interface `IMixinService`

    - #### getContainersFromAgents

          protected final void getContainersFromAgents​(com.google.common.collect.ImmutableList.Builder<IContainerHandle> list)

      Collect mixin containers from platform agents

    - #### getSideName

          public final java.lang.String getSideName()

      Description copied from interface: `IMixinService`
      Get the detected side name for this environment
      Specified by:
        `getSideName` in interface `IMixinService`

    - #### getLogger

          public ILogger getLogger​(java.lang.String name)

      Description copied from interface: `IMixinService`
      Retrieve a logger adapter with the specified name (id). In general this method will be called many times for a given name so it is anticipated that the returned logger instances are cached by the service.

      There is no contractual requirement however that adapters are cached and that the same adapter is returned for every call to this method with the same name.

      This methood must not return `null`.

      Implementations should be thread-safe since loggers may be requested by threads other than the main application thread.

      Specified by:
        `getLogger` in interface `IMixinService`
      Parameters:
        `name` - Logger name
      Returns:
        Logger adapter for the underlying logging subsystem

    - #### createLogger

          protected ILogger createLogger​(java.lang.String name)

    - #### wire

          @Deprecated
          public void wire​(MixinEnvironment.Phase phase,
                           IConsumer<MixinEnvironment.Phase> phaseConsumer)

      Deprecated.
      temporary
      Temp wiring. Called when the initial phase is spun up in the environment.
      Parameters:
        `phase` - Initial phase
        `phaseConsumer` - Delegate for the service (or agents) to trigger later phases

    - #### unwire

          @Deprecated
          public void unwire()

      Deprecated.
      temporary
      Temp wiring. Called when the default phase is started in the environment.