Class MixinPlatformAgentAbstract
java.lang.Object
org.spongepowered.asm.launch.platform.MixinPlatformAgentAbstract
- All Implemented Interfaces:
IMixinPlatformAgent
- Direct Known Subclasses:
MixinPlatformAgentDefault
Platform agent base class
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.asm.launch.platform.IMixinPlatformAgent
IMixinPlatformAgent.AcceptResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IContainerHandle
URI to the containerprotected static final ILogger
Loggerprotected MixinPlatformManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept
(MixinPlatformManager manager, IContainerHandle handle) Accept and bind to a container handle.Get the phase provider for this agentvoid
Called from inject in the parent tweaker but only called on the primary tweak container.void
inject()
Called from inject in the parent tweakerprotected static String
invokeStringMethod
(ClassLoader classLoader, String className, String methodName) void
prepare()
Called during pre-initialisation, after all tweakers and tweak containers have been added to the environment.toString()
void
unwire()
Deprecated.temporaryvoid
wire
(MixinEnvironment.Phase phase, IConsumer<MixinEnvironment.Phase> phaseConsumer) Deprecated.temporary
-
Field Details
-
logger
Logger -
manager
-
handle
URI to the container
-
-
Constructor Details
-
MixinPlatformAgentAbstract
protected MixinPlatformAgentAbstract()Ctor
-
-
Method Details
-
accept
public IMixinPlatformAgent.AcceptResult accept(MixinPlatformManager manager, IContainerHandle handle) Description copied from interface:IMixinPlatformAgent
Accept and bind to a container handle. This method is called for agents hosted byMixinContainer
and 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:
accept
in interfaceIMixinPlatformAgent
- Parameters:
manager
- platform manager instancehandle
- handle to container- Returns:
- AcceptResult representing this agent's acceptance of the supplied container
-
getPhaseProvider
Description copied from interface:IMixinPlatformAgent
Get the phase provider for this agent- Specified by:
getPhaseProvider
in interfaceIMixinPlatformAgent
-
prepare
public void prepare()Description copied from interface:IMixinPlatformAgent
Called during pre-initialisation, after all tweakers and tweak containers have been added to the environment.- Specified by:
prepare
in interfaceIMixinPlatformAgent
-
initPrimaryContainer
public void initPrimaryContainer()Description copied from interface:IMixinPlatformAgent
Called 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:
initPrimaryContainer
in interfaceIMixinPlatformAgent
-
inject
public void inject()Description copied from interface:IMixinPlatformAgent
Called from inject in the parent tweaker- Specified by:
inject
in interfaceIMixinPlatformAgent
-
toString
-
invokeStringMethod
protected static String invokeStringMethod(ClassLoader classLoader, String className, 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.temporaryCalled when the DEFAULT phase is started
-