Package org.spongepowered.asm.service
Class MixinServiceAbstract
java.lang.Object
org.spongepowered.asm.service.MixinServiceAbstract
- All Implemented Interfaces:
IMixinService
Mixin Service base class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final ReEntranceLockTransformer re-entrance lock, shared between the mixin transformer and the metadata serviceprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled whenever a new phase is startedvoidCheck whether the supplied object is a valid boot source for mixin environmentprotected ILoggercreateLogger(String name) protected final voidgetContainersFromAgents(com.google.common.collect.ImmutableList.Builder<IContainerHandle> list) Collect mixin containers from platform agentsGet the initial subsystem phaseprotected final <T extends IMixinInternal>
TgetInternal(Class<T> type) Retrieve a logger adapter with the specified name (id).Get the maximum compatibility level supported by this service.Get the minimum compatibility level supported by this service.Get a collection of containers in the current environment which contain mixins we should processGet 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.final StringGet the detected side name for this environmentvoidinit()Called at the end of subsystem bootvoidoffer(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.voidprepare()Called at subsystem bootvoidunwire()Deprecated.temporaryvoidwire(MixinEnvironment.Phase phase, IConsumer<MixinEnvironment.Phase> phaseConsumer) Deprecated.temporaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.spongepowered.asm.service.IMixinService
getAuditTrail, getBytecodeProvider, getClassProvider, getClassTracker, getName, getPlatformAgents, getPrimaryContainer, getResourceAsStream, getTransformerProvider, isValid
-
Field Details
-
LAUNCH_PACKAGE
- See Also:
-
MIXIN_PACKAGE
- See Also:
-
SERVICE_PACKAGE
- See Also:
-
lock
Transformer re-entrance lock, shared between the mixin transformer and the metadata service
-
-
Constructor Details
-
MixinServiceAbstract
public MixinServiceAbstract()
-
-
Method Details
-
prepare
public void prepare()Description copied from interface:IMixinServiceCalled at subsystem boot- Specified by:
preparein interfaceIMixinService
-
getInitialPhase
Description copied from interface:IMixinServiceGet the initial subsystem phase- Specified by:
getInitialPhasein interfaceIMixinService
-
getMinCompatibilityLevel
Description copied from interface:IMixinServiceGet 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:
getMinCompatibilityLevelin interfaceIMixinService- Returns:
- minimum supported
MixinEnvironment.CompatibilityLevelor null
-
getMaxCompatibilityLevel
Description copied from interface:IMixinServiceGet 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:
getMaxCompatibilityLevelin interfaceIMixinService- Returns:
- minimum supported
MixinEnvironment.CompatibilityLevelor null
-
offer
Description copied from interface:IMixinServiceCalled 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:
offerin interfaceIMixinService- Parameters:
internal- Internal component being offered
-
getInternal
-
init
public void init()Description copied from interface:IMixinServiceCalled at the end of subsystem boot- Specified by:
initin interfaceIMixinService
-
beginPhase
public void beginPhase()Description copied from interface:IMixinServiceCalled whenever a new phase is started- Specified by:
beginPhasein interfaceIMixinService
-
checkEnv
Description copied from interface:IMixinServiceCheck whether the supplied object is a valid boot source for mixin environment- Specified by:
checkEnvin interfaceIMixinService- Parameters:
bootSource- boot source
-
getReEntranceLock
Description copied from interface:IMixinServiceGet 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:
getReEntranceLockin interfaceIMixinService
-
getMixinContainers
Description copied from interface:IMixinServiceGet a collection of containers in the current environment which contain mixins we should process- Specified by:
getMixinContainersin interfaceIMixinService
-
getContainersFromAgents
protected final void getContainersFromAgents(com.google.common.collect.ImmutableList.Builder<IContainerHandle> list) Collect mixin containers from platform agents -
getSideName
Description copied from interface:IMixinServiceGet the detected side name for this environment- Specified by:
getSideNamein interfaceIMixinService
-
getLogger
Description copied from interface:IMixinServiceRetrieve 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:
getLoggerin interfaceIMixinService- Parameters:
name- Logger name- Returns:
- Logger adapter for the underlying logging subsystem
-
createLogger
-
wire
@Deprecated public void wire(MixinEnvironment.Phase phase, IConsumer<MixinEnvironment.Phase> phaseConsumer) Deprecated.temporaryTemp wiring. Called when the initial phase is spun up in the environment.- Parameters:
phase- Initial phasephaseConsumer- Delegate for the service (or agents) to trigger later phases
-
unwire
Deprecated.temporaryTemp wiring. Called when the default phase is started in the environment.
-