Package net.bytebuddy.agent.builder
Interface AgentBuilder.FallbackStrategy
-
- All Known Implementing Classes:
AgentBuilder.FallbackStrategy.ByThrowableType,AgentBuilder.FallbackStrategy.Simple
- Enclosing interface:
- AgentBuilder
public static interface AgentBuilder.FallbackStrategyA fallback strategy allows to reattempt a transformation or a consideration for redefinition/retransformation in case an exception occurs. Doing so, it is possible to use aTypePoolrather than using a loaded type description backed by aClass. Loaded types can raise exceptions and errors if aClassLoadercannot resolve all types that this class references. Using a type pool, such errors can be avoided as type descriptions can be resolved lazily, avoiding such errors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.FallbackStrategy.ByThrowableTypeA fallback strategy that discriminates by the type of theThrowablethat triggered a request.static classAgentBuilder.FallbackStrategy.SimpleA simple fallback strategy that either always reattempts a transformation or never does so.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisFallback(java.lang.Class<?> type, java.lang.Throwable throwable)Returnstrueif the supplied type and throwable combination should result in a reattempt where the loaded type is not used for querying information.
-
-
-
Method Detail
-
isFallback
boolean isFallback(java.lang.Class<?> type, java.lang.Throwable throwable)Returnstrueif the supplied type and throwable combination should result in a reattempt where the loaded type is not used for querying information.- Parameters:
type- The loaded type that was queried during the transformation attempt.throwable- The error or exception that was caused during the transformation.- Returns:
trueif the supplied type and throwable combination should
-
-