Interface AgentBuilder.RawMatcher

All Known Implementing Classes:
AgentBuilder.Default.Transformation.DifferentialMatcher, AgentBuilder.Default.Transformation.SimpleMatcher, AgentBuilder.RawMatcher.Conjunction, AgentBuilder.RawMatcher.Disjunction, AgentBuilder.RawMatcher.ForElementMatchers, AgentBuilder.RawMatcher.ForLoadState, AgentBuilder.RawMatcher.ForResolvableTypes, AgentBuilder.RawMatcher.Inversion, AgentBuilder.RawMatcher.Trivial
Enclosing interface:
AgentBuilder

public static interface AgentBuilder.RawMatcher
A matcher that allows to determine if a AgentBuilder.Transformer should be applied during the execution of a ClassFileTransformer that was generated by an AgentBuilder.
  • Method Details

    • matches

      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.
      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.