Package io.papermc.asm.rules.method
Interface OwnableMethodRewriteRule.Filtered
- All Superinterfaces:
MethodRewriteRule,OwnableMethodRewriteRule,OwnableRewriteRule,RewriteRule
- All Known Implementing Classes:
DirectParameterRewrite,DirectReturnRewrite,DirectStaticRewrite,FuzzyParameterRewrite,MoveInstanceMethod,SubTypeReturnRewrite,SuperTypeParamRewrite
- Enclosing interface:
- OwnableMethodRewriteRule
A rule that targets specific owners and methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.asm.rules.method.OwnableMethodRewriteRule
OwnableMethodRewriteRule.FilteredNested 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 TypeMethodDescriptionA matcher to test against method names and descriptors.default 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
-
methodMatcher
MethodMatcher methodMatcher()A matcher to test against method names and descriptors.- Returns:
- the method matcher
-
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- Specified by:
shouldProcessin interfaceOwnableMethodRewriteRule- 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
-