Package io.papermc.asm.rules.method
Interface OwnableMethodRewriteRule
- All Superinterfaces:
MethodRewriteRule,OwnableRewriteRule,RewriteRule
- All Known Subinterfaces:
OwnableMethodRewriteRule.Filtered,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
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.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.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
-
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- 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
-