Package io.papermc.asm.rules.generate
Interface GeneratedMethodSource<C>
- All Superinterfaces:
GeneratedMethodHolder
- All Known Subinterfaces:
GeneratedMethodSource.NoContext,StaticRewrite.Generated.Param,StaticRewrite.Generated.Return,StaticRewriteGeneratedMethodHolder.Param,StaticRewriteGeneratedMethodHolder.Return
- All Known Implementing Classes:
StaticRewrites.DirectParam,StaticRewrites.DirectReturn,StaticRewrites.FuzzyParam
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.papermc.asm.rules.generate.GeneratedMethodHolder
GeneratedMethodHolder.CallData, GeneratedMethodHolder.ConstructorCallData, GeneratedMethodHolder.MethodCallData -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidgenerateConstructor(RewriteRule.GeneratorAdapterFactory factory, GeneratedMethodHolder.MethodCallData modified, GeneratedMethodHolder.ConstructorCallData original) default voidgenerateMethod(RewriteRule.GeneratorAdapterFactory factory, GeneratedMethodHolder.MethodCallData modified, GeneratedMethodHolder.MethodCallData original) Generates a method with the provided information.default voidgenerateParameters(GeneratorAdapter methodGenerator, MethodTypeDesc descriptor, C context) default voidgenerateReturnValue(GeneratorAdapter methodGenerator, GeneratedMethodHolder.CallData insn) transformInvokedDescriptor(MethodTypeDesc original, C context) Transforms the descriptor of the generated method to the descriptor of the method that will be called within the generated method.
-
Field Details
-
VOID
-
-
Method Details
-
transformInvokedDescriptor
Transforms the descriptor of the generated method to the descriptor of the method that will be called within the generated method. This should be the method that actually exists in source.- Parameters:
original- the method descriptor of the generated method that the bytecode was redirected tocontext- context for the generator- Returns:
- the descriptor of the method that will be called inside the generated method
-
generateParameters
default void generateParameters(GeneratorAdapter methodGenerator, MethodTypeDesc descriptor, C context) -
generateConstructor
default void generateConstructor(RewriteRule.GeneratorAdapterFactory factory, GeneratedMethodHolder.MethodCallData modified, GeneratedMethodHolder.ConstructorCallData original) - Specified by:
generateConstructorin interfaceGeneratedMethodHolder
-
generateMethod
default void generateMethod(RewriteRule.GeneratorAdapterFactory factory, GeneratedMethodHolder.MethodCallData modified, GeneratedMethodHolder.MethodCallData original) Description copied from interface:GeneratedMethodHolderGenerates a method with the provided information.- Specified by:
generateMethodin interfaceGeneratedMethodHolder- Parameters:
factory- the factory for method generationmodified- the method call information that replaced the matching method in bytecodeoriginal- the original method that was matched in the bytecode
-
generateReturnValue
default void generateReturnValue(GeneratorAdapter methodGenerator, GeneratedMethodHolder.CallData insn) -
createNewContext
C createNewContext()
-