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.PoolStrategy, AgentBuilder.RawMatcher, AgentBuilder.RedefinitionListenable, AgentBuilder.RedefinitionStrategy, AgentBuilder.Transformer, AgentBuilder.TransformerDecorator, AgentBuilder.TypeStrategy
-
-
Field Summary
Fields Modifier and Type Field Description private AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
resubmissionImmediateMatcher
A matcher to determine resubmissions without errors.private AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher
resubmissionOnErrorMatcher
A matcher to determine resubmissions on errors.private AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
resubmissionScheduler
The resubmission scheduler to use.
-
Constructor Summary
Constructors Modifier Constructor Description protected
WithResubmission(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcher, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcher)
Creates a new delegator that applies resubmissions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AgentBuilder
materialize()
Materializes the currently describedAgentBuilder
.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
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.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitImmediate(ElementMatcher<java.lang.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitImmediate(ElementMatcher<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitImmediate(ElementMatcher<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitOnError()
Specifies that transformations of unloaded types that yield an error are resubmitted as transformation of the loaded type.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitOnError(ElementMatcher<? super java.lang.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitOnError(ElementMatcher<? super java.lang.Throwable> exceptionMatcher, ElementMatcher<java.lang.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitOnError(ElementMatcher<? super java.lang.Throwable> exceptionMatcher, ElementMatcher<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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.AgentBuilder.RedefinitionListenable.WithResubmissionSpecification
resubmitOnError(ElementMatcher<? super java.lang.Throwable> exceptionMatcher, ElementMatcher<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, 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, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
-
-
-
-
Field Detail
-
resubmissionScheduler
private final AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler
The resubmission scheduler to use.
-
resubmissionOnErrorMatcher
private final AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcher
A matcher to determine resubmissions on errors.
-
resubmissionImmediateMatcher
private final AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcher
A matcher to determine resubmissions without errors.
-
-
Constructor Detail
-
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 Detail
-
materialize
protected AgentBuilder 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
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification 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 java.lang.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 java.lang.Throwable> exceptionMatcher, ElementMatcher<java.lang.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 java.lang.Throwable> exceptionMatcher, ElementMatcher<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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 java.lang.Throwable> exceptionMatcher, ElementMatcher<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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
public AgentBuilder.RedefinitionListenable.WithResubmissionSpecification 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<java.lang.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<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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<java.lang.String> typeNameMatcher, ElementMatcher<? super java.lang.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.
-
-