Class AgentBuilder.RawMatcher.Inversion

java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.Inversion
All Implemented Interfaces:
AgentBuilder.RawMatcher
Enclosing interface:
AgentBuilder.RawMatcher

@Enhance public static class AgentBuilder.RawMatcher.Inversion extends Object implements AgentBuilder.RawMatcher
A raw matcher that inverts a raw matcher's result.
  • Field Details

  • Constructor Details

    • Inversion

      public Inversion(AgentBuilder.RawMatcher matcher)
      Creates a raw matcher that inverts its result.
      Parameters:
      matcher - The matcher to invert.
  • Method Details

    • matches

      public boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, @MaybeNull ProtectionDomain protectionDomain)
      Decides if the given typeDescription should be instrumented with the entailed AgentBuilder.Transformers.
      Specified by:
      matches in interface AgentBuilder.RawMatcher
      Parameters:
      typeDescription - A description of the type to be instrumented.
      classLoader - The class loader of the instrumented type. Might be null if this class loader represents the bootstrap class loader.
      module - The transformed type's module or null if the current VM does not support modules.
      classBeingRedefined - The class being redefined which is only not null if a retransformation is applied.
      protectionDomain - The protection domain of the type being transformed or null if none is available.
      Returns:
      true if the entailed AgentBuilder.Transformers should be applied for the given typeDescription.