Class MethodMapper
java.lang.Object
org.spongepowered.asm.mixin.transformer.MethodMapper
public class MethodMapper
extends java.lang.Object
Maintains method remaps for a target class
-
Constructor Summary
Constructors Constructor Description MethodMapper(MixinEnvironment env, ClassInfo info) -
Method Summary
Modifier and Type Method Description ClassInfogetClassInfo()java.lang.StringgetHandlerName(org.spongepowered.asm.mixin.transformer.MixinInfo.MixinMethodNode method)Get the name for a handler method provided a source mixin methodjava.lang.StringgetUniqueName(org.objectweb.asm.tree.FieldNode field, java.lang.String sessionId)Get a unique name for a fieldjava.lang.StringgetUniqueName(org.objectweb.asm.tree.MethodNode method, java.lang.String sessionId, boolean preservePrefix)Get a unique name for a methodvoidremapHandlerMethod(org.spongepowered.asm.mixin.transformer.MixinInfo mixin, org.objectweb.asm.tree.MethodNode handler, ClassInfo.Method method)Conforms an injector handler methodMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MethodMapper
-
-
Method Details
-
getClassInfo
-
remapHandlerMethod
public void remapHandlerMethod(org.spongepowered.asm.mixin.transformer.MixinInfo mixin, org.objectweb.asm.tree.MethodNode handler, ClassInfo.Method method)Conforms an injector handler method- Parameters:
mixin- owner mixinhandler- annotated injector handler methodmethod- method in target
-
getHandlerName
public java.lang.String getHandlerName(org.spongepowered.asm.mixin.transformer.MixinInfo.MixinMethodNode method)Get the name for a handler method provided a source mixin method- Parameters:
method- mixin method- Returns:
- conformed handler name
-
getUniqueName
public java.lang.String getUniqueName(org.objectweb.asm.tree.MethodNode method, java.lang.String sessionId, boolean preservePrefix)Get a unique name for a method- Parameters:
method- Method to obtain a unique name forsessionId- Session ID, for uniquenesspreservePrefix- If true, appends the unique part, preserving any method name prefix- Returns:
- Unique method name
-
getUniqueName
public java.lang.String getUniqueName(org.objectweb.asm.tree.FieldNode field, java.lang.String sessionId)Get a unique name for a field- Parameters:
field- Field to obtain a unique name forsessionId- Session ID, for uniqueness- Returns:
- Unique field name
-