Package net.bytebuddy.agent.builder
Class AgentBuilder.Default.Redefining.WithResubmission
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
net.bytebuddy.agent.builder.AgentBuilder.Default.Redefining.WithResubmission
- All Implemented Interfaces:
AgentBuilder
,AgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
,AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
- Enclosing class:
AgentBuilder.Default.Redefining
protected class AgentBuilder.Default.Redefining.WithResubmission
extends AgentBuilder.Default.Delegator
implements AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
A delegator that applies a resubmission.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
AgentBuilder.Default.Delegator.Matchable<S extends AgentBuilder.Matchable<S>>
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder
AgentBuilder.CircularityLock, AgentBuilder.ClassFileBufferStrategy, AgentBuilder.Default, AgentBuilder.DescriptionStrategy, AgentBuilder.FallbackStrategy, AgentBuilder.Identified, AgentBuilder.Ignored, AgentBuilder.InitializationStrategy, AgentBuilder.InjectionStrategy, AgentBuilder.InstallationListener, AgentBuilder.LambdaInstrumentationStrategy, AgentBuilder.Listener, AgentBuilder.LocationStrategy, AgentBuilder.Matchable<T extends AgentBuilder.Matchable<T>>, AgentBuilder.PatchMode, AgentBuilder.PoolStrategy, AgentBuilder.RawMatcher, AgentBuilder.RedefinitionListenable, AgentBuilder.RedefinitionStrategy, AgentBuilder.Transformer, AgentBuilder.TransformerDecorator, AgentBuilder.TypeStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionA matcher to determine resubmissions without errors.A matcher to determine resubmissions on errors.private final AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
The resubmission scheduler to use. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WithResubmission
(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcher, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcher) Creates a new delegator that applies resubmissions. -
Method Summary
Modifier and TypeMethodDescriptionprotected AgentBuilder
Materializes the currently describedAgentBuilder
.Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.resubmitImmediate
(ElementMatcher<String> typeNameMatcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.resubmitImmediate
(ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.resubmitImmediate
(ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher, ElementMatcher<? super JavaModule> moduleMatcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type.Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matcher matches the type in question.resubmitOnError
(ElementMatcher<? super Throwable> exceptionMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matcher matches the type in question.resubmitOnError
(ElementMatcher<? super Throwable> exceptionMatcher, ElementMatcher<String> typeNameMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matchers match the type in question.resubmitOnError
(ElementMatcher<? super Throwable> exceptionMatcher, ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matchers match the type in question.resubmitOnError
(ElementMatcher<? super Throwable> exceptionMatcher, ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher, ElementMatcher<? super JavaModule> moduleMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matchers match the type in question.Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableClassFormatChanges, disableNativeMethodPrefix, enableNativeMethodPrefix, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, patchOn, patchOn, patchOnByteBuddyAgent, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.bytebuddy.agent.builder.AgentBuilder
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableClassFormatChanges, disableNativeMethodPrefix, enableNativeMethodPrefix, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, patchOn, patchOn, patchOnByteBuddyAgent, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
-
Field Details
-
resubmissionScheduler
The resubmission scheduler to use. -
resubmissionOnErrorMatcher
private final AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcherA matcher to determine resubmissions on errors. -
resubmissionImmediateMatcher
private final AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcherA matcher to determine resubmissions without errors.
-
-
Constructor Details
-
WithResubmission
protected WithResubmission(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcher, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcher) Creates a new delegator that applies resubmissions.- Parameters:
resubmissionScheduler
- The resubmission scheduler to use.resubmissionOnErrorMatcher
- A matcher to determine resubmissions on errors.resubmissionImmediateMatcher
- A matcher to determine resubmissions without errors.
-
-
Method Details
-
materialize
Description copied from class:AgentBuilder.Default.Delegator
Materializes the currently describedAgentBuilder
.- Specified by:
materialize
in classAgentBuilder.Default.Delegator
- Returns:
- An agent builder that represents the currently described entry of this instance.
-
resubmitOnError
Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type.- Specified by:
resubmitOnError
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitOnError
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitOnError(ElementMatcher<? super Throwable> exceptionMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matcher matches the type in question.- Specified by:
resubmitOnError
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
exceptionMatcher
- Determines if a type should be resubmitted upon a given exception.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitOnError
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitOnError(ElementMatcher<? super Throwable> exceptionMatcher, ElementMatcher<String> typeNameMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matchers match the type in question.- Specified by:
resubmitOnError
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
exceptionMatcher
- Determines if a type should be resubmitted upon a given exception.typeNameMatcher
- Determines if a type should be resubmitted if the type has a given name.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitOnError
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitOnError(ElementMatcher<? super Throwable> exceptionMatcher, ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matchers match the type in question.- Specified by:
resubmitOnError
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
exceptionMatcher
- Determines if a type should be resubmitted upon a given exception.typeNameMatcher
- Determines if a type should be resubmitted if the type has a given name.classLoaderMatcher
- Determines if a type should be resubmitted upon being loaded by a given class loader.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitOnError
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitOnError(ElementMatcher<? super Throwable> exceptionMatcher, ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher, ElementMatcher<? super JavaModule> moduleMatcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matchers match the type in question.- Specified by:
resubmitOnError
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
exceptionMatcher
- Determines if a type should be resubmitted upon a given exception.typeNameMatcher
- Determines if a type should be resubmitted if the type has a given name.classLoaderMatcher
- Determines if a type should be resubmitted upon being loaded by a given class loader.moduleMatcher
- Determines if a type should be resubmitted upon a given Java module.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitOnError
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitOnError(AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher matcher) Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type, given that the specified matcher matches the type in question.- Specified by:
resubmitOnError
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
matcher
- Determines if a type should be resubmitted.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitImmediate
Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.- Specified by:
resubmitImmediate
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitImmediate
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitImmediate(ElementMatcher<String> typeNameMatcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.- Specified by:
resubmitImmediate
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
typeNameMatcher
- Determines if a type should be resubmitted if the type has a given name.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitImmediate
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitImmediate(ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.- Specified by:
resubmitImmediate
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
typeNameMatcher
- Determines if a type should be resubmitted if the type has a given name.classLoaderMatcher
- Determines if a type should be resubmitted upon being loaded by a given class loader.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitImmediate
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitImmediate(ElementMatcher<String> typeNameMatcher, ElementMatcher<? super ClassLoader> classLoaderMatcher, ElementMatcher<? super JavaModule> moduleMatcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.- Specified by:
resubmitImmediate
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
typeNameMatcher
- Determines if a type should be resubmitted if the type has a given name.classLoaderMatcher
- Determines if a type should be resubmitted upon being loaded by a given class loader.moduleMatcher
- Determines if a type should be resubmitted upon a given Java module.- Returns:
- A new agent builder that allows for further resubmission specifications.
-
resubmitImmediate
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification resubmitImmediate(AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher matcher) Specifies that transformations of unloaded types should not be transformed when they are loaded for the first time but should rather be resubmitted after they are loaded.- Specified by:
resubmitImmediate
in interfaceAgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification
- Parameters:
matcher
- Determines if a type should be resubmitted.- Returns:
- A new agent builder that allows for further resubmission specifications.
-