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.FuzzyParam
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault MethodTypeDesccomputeGeneratedDescriptor(MethodTypeDesc existing, C context) Modifies the descriptor for the actual method for the generated method.default voidgenerateMethod(Map.Entry<Executable, ? extends MethodTypeDesc> pair, RewriteRule.MethodGeneratorFactory factory) default voidgenerateParameters(GeneratorAdapter methodGenerator, MethodTypeDesc descriptor, C context) default voidgenerateReturnValue(GeneratorAdapter methodGenerator, Executable executable) Methods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodHolder
generatedMethodOwner, staticRedirectOwner
-
Method Details
-
generateMethod
default void generateMethod(Map.Entry<Executable, ? extends MethodTypeDesc> pair, RewriteRule.MethodGeneratorFactory factory) - Specified by:
generateMethodin interfaceGeneratedMethodHolder
-
computeGeneratedDescriptor
Modifies the descriptor for the actual method for the generated method.- Parameters:
existing- the original (in source) method descriptorcontext- context for the generator- Returns:
- the modified descriptor
-
generateParameters
default void generateParameters(GeneratorAdapter methodGenerator, MethodTypeDesc descriptor, C context) -
generateReturnValue
-
createNewContext
C createNewContext()
-