Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.ForElementMatchers
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.ForElementMatchers
- All Implemented Interfaces:
AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
- Enclosing interface:
- AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
@Enhance
public static class AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.ForElementMatchers
extends Object
implements AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
A matcher for immediate resubmission that uses element matchers for each argument to determine a resubmission.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.Conjunction, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.Disjunction, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.ForElementMatchers, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.Trivial
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher<? super ClassLoader>
The matcher to use for the instrumented type's class loader.private final ElementMatcher<? super JavaModule>
The matcher to use for the instrumented type's module.private final ElementMatcher<String>
The matcher to use for the instrumented type's name. -
Constructor Summary
ConstructorsConstructorDescriptionForElementMatchers
(ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher, ElementMatcher<? super JavaModule> moduleMatcher) Creates a new matcher for immediate resubmission that is using element matchers. -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(String typeName, ClassLoader classLoader, JavaModule module) Returnstrue
if a type should be resubmitted if it is not yet loaded.
-
Field Details
-
typeNameMatcher
The matcher to use for the instrumented type's name. -
classLoaderMatcher
The matcher to use for the instrumented type's class loader. -
moduleMatcher
The matcher to use for the instrumented type's module.
-
-
Constructor Details
-
ForElementMatchers
public ForElementMatchers(ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher, ElementMatcher<? super JavaModule> moduleMatcher) Creates a new matcher for immediate resubmission that is using element matchers.- Parameters:
typeNameMatcher
- The matcher to use for the instrumented type's name.classLoaderMatcher
- The matcher to use for the instrumented type's class loader.moduleMatcher
- The matcher to use for the instrumented type's module.
-
-
Method Details
-
matches
public boolean matches(String typeName, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module) Returnstrue
if a type should be resubmitted if it is not yet loaded.- Specified by:
matches
in interfaceAgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
- Parameters:
typeName
- The name of the instrumented type.classLoader
- The class loader of the instrumented type ornull
if the type is loaded by the bootstrap class loader.module
- The module of the instrumented type ornull
if the current VM does not support modules.- Returns:
true
if the type should be resubmitted.
-