Package io.papermc.asm.rules.method
Interface OwnableMethodRewriteRule.Filtered
- All Superinterfaces:
MethodRewriteRule,OwnableMethodRewriteRule,OwnableRewriteRule,RewriteRule
- All Known Subinterfaces:
StaticRewrite,StaticRewrite.Generated,StaticRewrite.Generated.Param,StaticRewrite.Generated.Return
- All Known Implementing Classes:
MethodRewrites.SubTypeReturn,MethodRewrites.SuperTypeParam,StaticRewrites.DirectParam,StaticRewrites.DirectReturn,StaticRewrites.FuzzyParam,StaticRewrites.Plain
- 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.MethodRewriteRule
MethodRewriteRule.GeneratorInfo<D extends GeneratedMethodHolder.CallData>, MethodRewriteRule.MethodGenerator, MethodRewriteRule.Rewrite<D extends GeneratedMethodHolder.CallData>, MethodRewriteRule.RewriteSingleNested 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 TypeMethodDescriptiondefault booleanshouldProcess(ClassProcessingContext context, int opcode, String owner, String name, String descriptor, boolean isInterface) Checks if this rule should even attempt to create aMethodRewriteRule.Rewritefor 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() -
shouldProcess
default boolean shouldProcess(ClassProcessingContext context, int opcode, String owner, String name, String descriptor, boolean isInterface) Description copied from interface:MethodRewriteRuleChecks if this rule should even attempt to create aMethodRewriteRule.Rewritefor the current context. Returning true here does not mean aMethodRewriteRule.Rewritewill 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 interface- Returns:
- true to continue processing the instruction
-