Package net.bytebuddy.agent.builder
Class AgentBuilder.RawMatcher.Disjunction
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.Disjunction
- All Implemented Interfaces:
AgentBuilder.RawMatcher
- Enclosing interface:
AgentBuilder.RawMatcher
@Enhance
public static class AgentBuilder.RawMatcher.Disjunction
extends Object
implements AgentBuilder.RawMatcher
A disjunction of two raw matchers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RawMatcher
AgentBuilder.RawMatcher.Conjunction, AgentBuilder.RawMatcher.Disjunction, AgentBuilder.RawMatcher.ForElementMatchers, AgentBuilder.RawMatcher.ForLoadState, AgentBuilder.RawMatcher.ForResolvableTypes, AgentBuilder.RawMatcher.Inversion, AgentBuilder.RawMatcher.Trivial
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<AgentBuilder.RawMatcher> The matchers to apply in their application order. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Disjunction
(List<? extends AgentBuilder.RawMatcher> matchers) Creates a new conjunction of two raw matchers.protected
Disjunction
(AgentBuilder.RawMatcher... matcher) Creates a new conjunction of two raw matchers. -
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.
-
Field Details
-
matchers
The matchers to apply in their application order.
-
-
Constructor Details
-
Disjunction
Creates a new conjunction of two raw matchers.- Parameters:
matcher
- The matchers to apply in their application order.
-
Disjunction
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, @MaybeNull ProtectionDomain protectionDomain) Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.- Specified by:
matches
in interfaceAgentBuilder.RawMatcher
- 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
.
-