@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.FallbackStrategy.ByThrowableType extends Object implements AgentBuilder.FallbackStrategy
Throwable
that triggered a request.AgentBuilder.FallbackStrategy.ByThrowableType, AgentBuilder.FallbackStrategy.Simple
Constructor and Description |
---|
ByThrowableType(Class<? extends Throwable>... type)
Creates a new throwable type-discriminating fallback strategy.
|
ByThrowableType(Set<? extends Class<? extends Throwable>> types)
Creates a new throwable type-discriminating fallback strategy.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isFallback(Class<?> type,
Throwable throwable)
Returns
true if the supplied type and throwable combination should result in a reattempt where the
loaded type is not used for querying information. |
static AgentBuilder.FallbackStrategy |
ofOptionalTypes()
Creates a fallback strategy that attempts a fallback if an error indicating a type error is the reason for requesting a reattempt.
|
public ByThrowableType(Class<? extends Throwable>... type)
type
- The throwable types that should trigger a fallback.public static AgentBuilder.FallbackStrategy ofOptionalTypes()
LinkageError
or a TypeNotPresentException
is raised.public boolean isFallback(Class<?> type, Throwable throwable)
true
if the supplied type and throwable combination should result in a reattempt where the
loaded type is not used for querying information.isFallback
in interface AgentBuilder.FallbackStrategy
type
- The loaded type that was queried during the transformation attempt.throwable
- The error or exception that was caused during the transformation.true
if the supplied type and throwable combination shouldCopyright © 2014–2021. All rights reserved.