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.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA conjunction of two raw matchers.static classA disjunction of two raw matchers.static classA raw matcher implementation that checks aTypeDescriptionand itsClassLoaderagainst two suitable matchers in order to determine if the matched type should be instrumented.static enumA raw matcher indicating the state of a type's class loading.static enumOnly matches loaded types that can be fully resolved.static classA raw matcher that inverts a raw matcher's result.static enumA matcher that always or never matches a type. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, Class<?> classBeingRedefined, ProtectionDomain protectionDomain) Decides if the giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.
-
Method Details
-
matches
boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, @MaybeNull ProtectionDomain protectionDomain) Decides if the giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.- Parameters:
typeDescription- A description of the type to be instrumented.classLoader- The class loader of the instrumented type. Might benullif this class loader represents the bootstrap class loader.module- The transformed type's module ornullif the current VM does not support modules.classBeingRedefined- The class being redefined which is only notnullif a retransformation is applied.protectionDomain- The protection domain of the type being transformed ornullif none is available.- Returns:
trueif the entailedAgentBuilder.Transformers should be applied for the giventypeDescription.
-