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.RawMatcherA matcher that allows to determine if aAgentBuilder.Transformershould be applied during the execution of aClassFileTransformerthat was generated by anAgentBuilder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.RawMatcher.ConjunctionA conjunction of two raw matchers.static classAgentBuilder.RawMatcher.DisjunctionA disjunction of two raw matchers.static classAgentBuilder.RawMatcher.ForElementMatchersA raw matcher implementation that checks aTypeDescriptionand itsClassLoaderagainst two suitable matchers in order to determine if the matched type should be instrumented.static classAgentBuilder.RawMatcher.ForLoadStateA raw matcher indicating the state of a type's class loading.static classAgentBuilder.RawMatcher.ForResolvableTypesOnly matches loaded types that can be fully resolved.static classAgentBuilder.RawMatcher.InversionA raw matcher that inverts a raw matcher's result.static classAgentBuilder.RawMatcher.TrivialA matcher that always or never matches a type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanmatches(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain)Decides if the giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.
-
-
-
Method Detail
-
matches
boolean matches(TypeDescription typeDescription, @MaybeNull java.lang.ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull java.lang.Class<?> classBeingRedefined, @MaybeNull java.security.ProtectionDomain protectionDomain)
Decides if the giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.- 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 ornullif none is available.- Returns:
trueif the entailedAgentBuilder.Transformers should be applied for the giventypeDescription.
-
-