Interface AgentBuilder.DescriptionStrategy
- All Known Implementing Classes:
AgentBuilder.DescriptionStrategy.Default, AgentBuilder.DescriptionStrategy.SuperTypeLoading, AgentBuilder.DescriptionStrategy.SuperTypeLoading.Asynchronous
- Enclosing interface:
AgentBuilder
public static interface AgentBuilder.DescriptionStrategy
A description strategy is responsible for resolving a
TypeDescription when transforming or retransforming/-defining a type.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDefault implementations of aAgentBuilder.DescriptionStrategy.static classA description strategy that enforces the loading of any super type of a type description but delegates the actual type description to another description strategy. -
Method Summary
Modifier and TypeMethodDescriptionapply(String name, Class<?> type, TypePool typePool, AgentBuilder.CircularityLock circularityLock, ClassLoader classLoader, JavaModule module) Describes the given type.booleanIndicates if this description strategy makes use of loaded type information and yields a different type description if no loaded type is available.
-
Method Details
-
isLoadedFirst
boolean isLoadedFirst()Indicates if this description strategy makes use of loaded type information and yields a different type description if no loaded type is available.- Returns:
trueif this description strategy prefers loaded type information when describing a type and only uses a type pool if loaded type information is not available.
-
apply
TypeDescription apply(String name, @MaybeNull Class<?> type, TypePool typePool, AgentBuilder.CircularityLock circularityLock, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module) Describes the given type.- Parameters:
name- The binary name of the type to describe.type- The type that is being redefined, if a redefinition is applied ornullif no redefined type is available.typePool- The type pool to use for locating a type if required.circularityLock- The currently used circularity lock.classLoader- The type's class loader wherenullrepresents the bootstrap class loader.module- The type's module ornullif the current VM does not support modules.- Returns:
- An appropriate type description.
-