Interface GeneratedStaticRewrite
- All Superinterfaces:
GeneratedMethodHolder,MethodRewriteRule,RewriteRule,StaticRewrite
- All Known Subinterfaces:
TargetedTypeGeneratedStaticRewrite,TargetedTypeGeneratedStaticRewrite.Parameter,TargetedTypeGeneratedStaticRewrite.Return
- All Known Implementing Classes:
DirectParameterRewrite,DirectReturnRewrite,FuzzyParameterRewrite,MoveInstanceMethod
A static rewrite which generates the method that the bytecode will be redirected to.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.asm.rules.generate.GeneratedMethodHolder
GeneratedMethodHolder.CallData, GeneratedMethodHolder.ConstructorCallData, GeneratedMethodHolder.MethodCallDataNested classes/interfaces inherited from interface io.papermc.asm.rules.RewriteRule
RewriteRule.Chain, RewriteRule.ChainBuilder, RewriteRule.Delegate, RewriteRule.GeneratorAdapterFactory -
Field Summary
Fields inherited from interface io.papermc.asm.rules.method.MethodRewriteRule
LAMBDA_METAFACTORY_OWNERFields inherited from interface io.papermc.asm.rules.RewriteRule
EMPTYFields inherited from interface io.papermc.asm.rules.method.StaticRewrite
CONSTRUCTOR_METHOD_NAME -
Method Summary
Modifier and TypeMethodDescriptioncreateConstructorRewrite(ClassProcessingContext context, MethodTypeDesc intermediateDescriptor, GeneratedMethodHolder.ConstructorCallData originalCallData) Creates a rewrite for the given constructor call data.createRewrite(ClassProcessingContext context, MethodTypeDesc intermediateDescriptor, GeneratedMethodHolder.MethodCallData originalCallData) Creates a rewrite for the given method call data.default ClassDescMethods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodHolder
createAdapter, generateConstructor, generateMethodMethods inherited from interface io.papermc.asm.rules.method.MethodRewriteRule
createVisitor, shouldProcessMethods inherited from interface io.papermc.asm.rules.method.StaticRewrite
rewrite, transformToRedirectDescriptor
-
Method Details
-
staticRedirectOwner
- Specified by:
staticRedirectOwnerin interfaceStaticRewrite
-
createRewrite
default MethodRewrite<GeneratedMethodHolder.MethodCallData> createRewrite(ClassProcessingContext context, MethodTypeDesc intermediateDescriptor, GeneratedMethodHolder.MethodCallData originalCallData) Description copied from interface:StaticRewriteCreates a rewrite for the given method call data.- Specified by:
createRewritein interfaceStaticRewrite- Parameters:
context- the contextintermediateDescriptor- the descriptor modified from the original to account for the method call type (interface, virtual, static, etc.)originalCallData- the original method call data- Returns:
- the rewrite
-
createConstructorRewrite
default MethodRewrite<GeneratedMethodHolder.ConstructorCallData> createConstructorRewrite(ClassProcessingContext context, MethodTypeDesc intermediateDescriptor, GeneratedMethodHolder.ConstructorCallData originalCallData) Description copied from interface:StaticRewriteCreates a rewrite for the given constructor call data.- Specified by:
createConstructorRewritein interfaceStaticRewrite- Parameters:
context- the contextintermediateDescriptor- the descriptor modified from the original to include a return typeoriginalCallData- the original constructor call data- Returns:
- the rewrite
-