Package io.papermc.asm.rules.method
Interface OwnableMethodRewriteRule
- All Superinterfaces:
MethodRewriteRule,OwnableRewriteRule,RewriteRule
- All Known Subinterfaces:
OwnableMethodRewriteRule.Filtered
- All Known Implementing Classes:
DirectParameterRewrite,DirectReturnRewrite,DirectStaticRewrite,FuzzyParameterRewrite,MoveInstanceMethod,SubTypeReturnRewrite,SuperTypeParamRewrite
A rule that targets specific owners.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA rule that targets specific owners and methods.Nested 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
EMPTY -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanshouldProcess(ClassProcessingContext context, int opcode, String owner, String name, String descriptor, boolean isInterface, boolean isInvokeDynamic) Checks if this rule should even attempt to create aMethodRewritefor the current context.Methods inherited from interface io.papermc.asm.rules.method.MethodRewriteRule
createVisitor, rewriteMethods inherited from interface io.papermc.asm.rules.OwnableRewriteRule
matchesOwner, owners
-
Method Details
-
shouldProcess
default boolean shouldProcess(ClassProcessingContext context, int opcode, String owner, String name, String descriptor, boolean isInterface, boolean isInvokeDynamic) Description copied from interface:MethodRewriteRuleChecks if this rule should even attempt to create aMethodRewritefor the current context. Returning true here does not mean aMethodRewritewill be created, but it's an early exit for rules that know they won't be able to rewrite the method.- Specified by:
shouldProcessin interfaceMethodRewriteRule- Parameters:
context- the current contextopcode- the method opcodeowner- the method owner (with slashes)name- the method namedescriptor- the method descriptorisInterface- if the owning class is an interfaceisInvokeDynamic- if the method call is from an invokedynamic instruction- Returns:
- true to continue processing the instruction
-