Class AgentBuilder.RawMatcher.Conjunction

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

@Enhance public static class AgentBuilder.RawMatcher.Conjunction extends Object implements AgentBuilder.RawMatcher
A conjunction of two raw matchers.
  • Field Details

  • Constructor Details

    • Conjunction

      protected Conjunction(AgentBuilder.RawMatcher... matcher)
      Creates a new conjunction of two raw matchers.
      Parameters:
      matcher - The matchers to apply in their application order.
    • Conjunction

      protected Conjunction(List<? extends AgentBuilder.RawMatcher> matchers)
      Creates a new conjunction of two raw matchers.
      Parameters:
      matchers - The matchers to apply in their application order.
  • Method Details

    • matches

      public boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, 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.
      Returns:
      true if the entailed AgentBuilder.Transformers should be applied for the given typeDescription.