Class InliningImplementationMatcher

java.lang.Object
net.bytebuddy.dynamic.scaffold.inline.InliningImplementationMatcher
All Implemented Interfaces:
LatentMatcher<MethodDescription>

@Enhance public class InliningImplementationMatcher extends Object implements LatentMatcher<MethodDescription>
A latent method matcher that identifies methods to instrument when redefining or rebasing a type.
  • Field Details

  • Constructor Details

    • InliningImplementationMatcher

      protected InliningImplementationMatcher(LatentMatcher<? super MethodDescription> ignoredMethods, ElementMatcher<? super MethodDescription> predefinedMethodSignatures)
      Creates a new inline implementation matcher.
      Parameters:
      ignoredMethods - A method matcher that matches any ignored method.
      predefinedMethodSignatures - A method matcher that matches any predefined method.
  • Method Details

    • of

      protected static LatentMatcher<MethodDescription> of(LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType)
      Creates a matcher where only overridable or declared methods are matched unless those are ignored. Methods that are declared by the target type are only matched if they are not ignored. Declared methods that are not found on the target type are always matched.
      Parameters:
      ignoredMethods - A method matcher that matches any ignored method.
      originalType - The original type of the instrumentation before adding any user methods.
      Returns:
      A latent method matcher that identifies any method to instrument for a rebasement or redefinition.
    • resolve

      public ElementMatcher<? super MethodDescription> resolve(TypeDescription typeDescription)
      Resolves the element matcher this instance represents for the supplied type description.
      Specified by:
      resolve in interface LatentMatcher<MethodDescription>
      Parameters:
      typeDescription - The type description for which the represented matcher should be resolved.
      Returns:
      An ElementMatcher that represents this matcher's resolved form.