@HashCodeAndEqualsPlugin.Enhance public static class MethodRebaseResolver.Default extends java.lang.Object implements MethodRebaseResolver
MethodRebaseResolver.Default, MethodRebaseResolver.Disabled, MethodRebaseResolver.Resolution| Modifier and Type | Field and Description |
|---|---|
private java.util.List<DynamicType> |
dynamicTypes
A list of dynamic types that need to be appended to the created type in order to allow for the rebasement.
|
private java.util.Map<MethodDescription.InDefinedShape,MethodRebaseResolver.Resolution> |
resolutions
A mapping of rebased methods to their existing resolutions.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Default(java.util.Map<MethodDescription.InDefinedShape,MethodRebaseResolver.Resolution> resolutions,
java.util.List<DynamicType> dynamicTypes)
Creates a new default method rebased resolver.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<MethodDescription.SignatureToken,MethodRebaseResolver.Resolution> |
asTokenMap()
Returns a map of all rebasable methods' signature tokens to their resolution.
|
java.util.List<DynamicType> |
getAuxiliaryTypes()
Returns a (potentially empty) list of auxiliary types that are required by this method rebase resolver.
|
static MethodRebaseResolver |
make(TypeDescription instrumentedType,
java.util.Set<? extends MethodDescription.Token> rebaseableMethodTokens,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
MethodNameTransformer methodNameTransformer)
Creates a new method rebase resolver.
|
MethodRebaseResolver.Resolution |
resolve(MethodDescription.InDefinedShape methodDescription)
Checks if a method is eligible for rebasing and resolves this possibly rebased method.
|
private final java.util.Map<MethodDescription.InDefinedShape,MethodRebaseResolver.Resolution> resolutions
private final java.util.List<DynamicType> dynamicTypes
protected Default(java.util.Map<MethodDescription.InDefinedShape,MethodRebaseResolver.Resolution> resolutions, java.util.List<DynamicType> dynamicTypes)
resolutions - A mapping of rebased methods to their existing resolutions.dynamicTypes - A list of dynamic types that need to be appended to the created type in order to allow for the rebasement.public static MethodRebaseResolver make(TypeDescription instrumentedType, java.util.Set<? extends MethodDescription.Token> rebaseableMethodTokens, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, MethodNameTransformer methodNameTransformer)
instrumentedType - The instrumented type.rebaseableMethodTokens - Tokens describing all methods that can possibly be rebased.classFileVersion - The class file version for the instrumentation.auxiliaryTypeNamingStrategy - The naming strategy for naming a potential auxiliary type.methodNameTransformer - A transformer for method names.public MethodRebaseResolver.Resolution resolve(MethodDescription.InDefinedShape methodDescription)
resolve in interface MethodRebaseResolvermethodDescription - A description of the method to resolve.public java.util.List<DynamicType> getAuxiliaryTypes()
getAuxiliaryTypes in interface MethodRebaseResolverpublic java.util.Map<MethodDescription.SignatureToken,MethodRebaseResolver.Resolution> asTokenMap()
asTokenMap in interface MethodRebaseResolver