Class MixinPlatformAgentAbstract
- java.lang.Object
-
- org.spongepowered.asm.launch.platform.MixinPlatformAgentAbstract
-
- All Implemented Interfaces:
IMixinPlatformAgent
- Direct Known Subclasses:
MixinPlatformAgentDefault
public abstract class MixinPlatformAgentAbstract extends java.lang.Object implements IMixinPlatformAgent
Platform agent base class
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.asm.launch.platform.IMixinPlatformAgent
IMixinPlatformAgent.AcceptResult
-
-
Field Summary
Fields Modifier and Type Field Description protected IContainerHandlehandleURI to the containerprotected static ILoggerloggerLoggerprotected MixinPlatformManagermanager
-
Constructor Summary
Constructors Modifier Constructor Description protectedMixinPlatformAgentAbstract()Ctor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IMixinPlatformAgent.AcceptResultaccept(MixinPlatformManager manager, IContainerHandle handle)Accept and bind to a container handle.java.lang.StringgetPhaseProvider()Get the phase provider for this agentvoidinitPrimaryContainer()Called from inject in the parent tweaker but only called on the primary tweak container.voidinject()Called from inject in the parent tweakerprotected static java.lang.StringinvokeStringMethod(java.lang.ClassLoader classLoader, java.lang.String className, java.lang.String methodName)voidprepare()Called during pre-initialisation, after all tweakers and tweak containers have been added to the environment.java.lang.StringtoString()voidunwire()Deprecated.temporaryvoidwire(MixinEnvironment.Phase phase, IConsumer<MixinEnvironment.Phase> phaseConsumer)Deprecated.temporary
-
-
-
Field Detail
-
logger
protected static final ILogger logger
Logger
-
manager
protected MixinPlatformManager manager
-
handle
protected IContainerHandle handle
URI to the container
-
-
Method Detail
-
accept
public IMixinPlatformAgent.AcceptResult accept(MixinPlatformManager manager, IContainerHandle handle)
Description copied from interface:IMixinPlatformAgentAccept and bind to a container handle. This method is called for agents hosted byMixinContainerand the agent should react accordingly. If the agent is not able to delegate for container handles of the supplied type, this method should return false to indicate that the agent should not be added for this container.- Specified by:
acceptin interfaceIMixinPlatformAgent- Parameters:
manager- platform manager instancehandle- handle to container- Returns:
- AcceptResult representing this agent's acceptance of the supplied container
-
getPhaseProvider
public java.lang.String getPhaseProvider()
Description copied from interface:IMixinPlatformAgentGet the phase provider for this agent- Specified by:
getPhaseProviderin interfaceIMixinPlatformAgent
-
prepare
public void prepare()
Description copied from interface:IMixinPlatformAgentCalled during pre-initialisation, after all tweakers and tweak containers have been added to the environment.- Specified by:
preparein interfaceIMixinPlatformAgent
-
initPrimaryContainer
public void initPrimaryContainer()
Description copied from interface:IMixinPlatformAgentCalled from inject in the parent tweaker but only called on the primary tweak container. This is useful if the agent needs to perform some environment-specific setup just once.- Specified by:
initPrimaryContainerin interfaceIMixinPlatformAgent
-
inject
public void inject()
Description copied from interface:IMixinPlatformAgentCalled from inject in the parent tweaker- Specified by:
injectin interfaceIMixinPlatformAgent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
invokeStringMethod
protected static java.lang.String invokeStringMethod(java.lang.ClassLoader classLoader, java.lang.String className, java.lang.String methodName)
-
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 public void unwire()
Deprecated.temporaryCalled when the DEFAULT phase is started
-
-