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 aAgentBuilder.Transformer
should be applied during the execution of aClassFileTransformer
that was generated by anAgentBuilder
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AgentBuilder.RawMatcher.Conjunction
A conjunction of two raw matchers.static class
AgentBuilder.RawMatcher.Disjunction
A disjunction of two raw matchers.static class
AgentBuilder.RawMatcher.ForElementMatchers
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 class
AgentBuilder.RawMatcher.ForLoadState
A raw matcher indicating the state of a type's class loading.static class
AgentBuilder.RawMatcher.ForResolvableTypes
Only matches loaded types that can be fully resolved.static class
AgentBuilder.RawMatcher.Inversion
A raw matcher that inverts a raw matcher's result.static class
AgentBuilder.RawMatcher.Trivial
A matcher that always or never matches a type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
matches(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain)
Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.
-
-
-
Method Detail
-
matches
boolean matches(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.lang.Class<?> classBeingRedefined, java.security.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.- Returns:
true
if the entailedAgentBuilder.Transformer
s should be applied for the giventypeDescription
.
-
-