Interface MethodRebaseResolver
- All Known Implementing Classes:
MethodRebaseResolver.Default
,MethodRebaseResolver.Disabled
public interface MethodRebaseResolver
A method rebase resolver is responsible for mapping methods of an instrumented type to an alternative signature.
This way a method can exist in two versions within a class:
- The rebased method which represents the original implementation as it is present in a class file.
- An overridden method which implements user code which is still able to invoke the original, rebased method.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A default implementation of a method rebase resolver.static enum
A method rebase resolver that preserves any method in its original form.static interface
A resolution for a method that was checked by aMethodRebaseResolver
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a map of all rebasable methods' signature tokens to their resolution.Returns a (potentially empty) list of auxiliary types that are required by this method rebase resolver.resolve
(MethodDescription.InDefinedShape methodDescription) Checks if a method is eligible for rebasing and resolves this possibly rebased method.
-
Method Details
-
resolve
Checks if a method is eligible for rebasing and resolves this possibly rebased method.- Parameters:
methodDescription
- A description of the method to resolve.- Returns:
- A resolution for the given method.
-
getAuxiliaryTypes
List<DynamicType> getAuxiliaryTypes()Returns a (potentially empty) list of auxiliary types that are required by this method rebase resolver.- Returns:
- A list of auxiliary types that are required by this method rebase resolver.
-
asTokenMap
Returns a map of all rebasable methods' signature tokens to their resolution.- Returns:
- A map of all rebasable methods' signature tokens to their resolution.
-