Interface OwnableMethodRewriteRule.Filtered

All Superinterfaces:
MethodRewriteRule, OwnableMethodRewriteRule, OwnableRewriteRule, RewriteRule
All Known Implementing Classes:
DirectParameterRewrite, DirectReturnRewrite, DirectStaticRewrite, FuzzyParameterRewrite, MoveInstanceMethod, SubTypeReturnRewrite, SuperTypeParamRewrite
Enclosing interface:
OwnableMethodRewriteRule

public static interface OwnableMethodRewriteRule.Filtered extends OwnableMethodRewriteRule
A rule that targets specific owners and methods.
  • 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: MethodRewriteRule
      Checks if this rule should even attempt to create a MethodRewrite for the current context. Returning true here does not mean a MethodRewrite 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
      Specified by:
      shouldProcess in interface OwnableMethodRewriteRule
      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
      isInvokeDynamic - if the method call is from an invokedynamic instruction
      Returns:
      true to continue processing the instruction