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

public interface OwnableMethodRewriteRule extends MethodRewriteRule, OwnableRewriteRule
A rule that targets specific owners.
  • Method Details

    • shouldProcess

      default boolean shouldProcess(ClassProcessingContext context, int opcode, String owner, String name, String descriptor, boolean isInterface)
      Description copied from interface: MethodRewriteRule
      Checks if this rule should even attempt to create a MethodRewriteRule.Rewrite for the current context. Returning true here does not mean a MethodRewriteRule.Rewrite will be created, but it's an early exit for rules that know they won't be able to rewrite the method.
      Specified by:
      shouldProcess in interface MethodRewriteRule
      Parameters:
      context - the current context
      opcode - the method opcode
      owner - the method owner (with slashes)
      name - the method name
      descriptor - the method descriptor
      isInterface - if the owning class is an interface
      Returns:
      true to continue processing the instruction