Package net.bytebuddy.agent.builder
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 class
A conjunction of two raw matchers.static class
A disjunction of two raw matchers.static class
A raw matcher implementation that checks aTypeDescription
and itsClassLoader
against two suitable matchers in order to determine if the matched type should be instrumented.static enum
A raw matcher indicating the state of a type's class loading.static enum
Only matches loaded types that can be fully resolved.static class
A raw matcher that inverts a raw matcher's result.static enum
A matcher that always or never matches a type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, Class<?> classBeingRedefined, ProtectionDomain protectionDomain) Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.
-
Method Details
-
matches
boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, @MaybeNull ProtectionDomain protectionDomain) Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.- Parameters:
typeDescription
- A description of the type to be instrumented.classLoader
- The class loader of the instrumented type. Might benull
if this class loader represents the bootstrap class loader.module
- The transformed type's module ornull
if the current VM does not support modules.classBeingRedefined
- The class being redefined which is only notnull
if a retransformation is applied.protectionDomain
- The protection domain of the type being transformed ornull
if none is available.- Returns:
true
if the entailedAgentBuilder.Transformer
s should be applied for the giventypeDescription
.
-