Package net.bytebuddy.agent.builder
Class AgentBuilder.RawMatcher.Inversion
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.Inversion
- All Implemented Interfaces:
AgentBuilder.RawMatcher
- Enclosing interface:
AgentBuilder.RawMatcher
@Enhance
public static class AgentBuilder.RawMatcher.Inversion
extends Object
implements AgentBuilder.RawMatcher
A raw matcher that inverts a raw matcher's result.
-
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInversion(AgentBuilder.RawMatcher matcher) Creates a raw matcher that inverts its result. -
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.
-
Field Details
-
matcher
The matcher to invert.
-
-
Constructor Details
-
Inversion
Creates a raw matcher that inverts its result.- Parameters:
matcher- The matcher to invert.
-
-
Method Details
-
matches
public boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, ProtectionDomain protectionDomain) Decides if the giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.- Specified by:
matchesin interfaceAgentBuilder.RawMatcher- 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.- Returns:
trueif the entailedAgentBuilder.Transformers should be applied for the giventypeDescription.
-