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 java.lang.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 Modifier and Type Field Description private AgentBuilder.RawMatcher
matcher
The matcher to invert.
-
Constructor Summary
Constructors Constructor Description Inversion(AgentBuilder.RawMatcher matcher)
Creates a raw matcher that inverts its result.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
matcher
private final AgentBuilder.RawMatcher matcher
The matcher to invert.
-
-
Constructor Detail
-
Inversion
public Inversion(AgentBuilder.RawMatcher matcher)
Creates a raw matcher that inverts its result.- Parameters:
matcher
- The matcher to invert.
-
-
Method Detail
-
matches
public 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.- 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.- Returns:
true
if the entailedAgentBuilder.Transformer
s should be applied for the giventypeDescription
.
-
-