public abstract static class Instrumentation.Target.AbstractBase extends Object implements Instrumentation.Target
Instrumentation.Target
.Instrumentation.Target.AbstractBase, Instrumentation.Target.Factory, Instrumentation.Target.MethodLookup
Modifier and Type | Field and Description |
---|---|
protected BridgeMethodResolver |
bridgeMethodResolver
A bridge method resolver for the given instrumented type.
|
protected Map<TypeDescription,Map<String,MethodDescription>> |
defaultMethods
A map of default methods by their unique signature.
|
protected Map<String,MethodDescription> |
invokableMethods
A map of invokable methods by their unique signature.
|
protected TypeDescription |
typeDescription
The type that is subject to instrumentation.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractBase(MethodLookupEngine.Finding finding,
BridgeMethodResolver.Factory bridgeMethodResolverFactory)
Creates a new instrumentation target.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
TypeDescription |
getTypeDescription()
Returns a description of the instrumented type.
|
int |
hashCode() |
Instrumentation.SpecialMethodInvocation |
invokeDefault(TypeDescription targetType,
String uniqueMethodSignature)
Creates a special method invocation for invoking a default method.
|
protected abstract Instrumentation.SpecialMethodInvocation |
invokeSuper(MethodDescription methodDescription)
Invokes the fully resolved method to be invoked by a super method call.
|
Instrumentation.SpecialMethodInvocation |
invokeSuper(MethodDescription methodDescription,
Instrumentation.Target.MethodLookup methodLookup)
Creates a special method invocation for invoking the super method of the given method.
|
protected final TypeDescription typeDescription
protected final Map<String,MethodDescription> invokableMethods
protected final Map<TypeDescription,Map<String,MethodDescription>> defaultMethods
protected final BridgeMethodResolver bridgeMethodResolver
protected AbstractBase(MethodLookupEngine.Finding finding, BridgeMethodResolver.Factory bridgeMethodResolverFactory)
finding
- A finding of a MethodLookupEngine
for the instrumented type.bridgeMethodResolverFactory
- A factory for creating a
BridgeMethodResolver
.public TypeDescription getTypeDescription()
Instrumentation.Target
getTypeDescription
in interface Instrumentation.Target
public Instrumentation.SpecialMethodInvocation invokeSuper(MethodDescription methodDescription, Instrumentation.Target.MethodLookup methodLookup)
Instrumentation.Target
invokeSuper
in interface Instrumentation.Target
methodDescription
- The method that is to be invoked specially.methodLookup
- The lookup for this method which mainly serves to avoid bridge method invocation.protected abstract Instrumentation.SpecialMethodInvocation invokeSuper(MethodDescription methodDescription)
methodDescription
- The method that is to be invoked specially.public Instrumentation.SpecialMethodInvocation invokeDefault(TypeDescription targetType, String uniqueMethodSignature)
Instrumentation.Target
invokeDefault
in interface Instrumentation.Target
targetType
- The interface on which the default method is to be invoked.uniqueMethodSignature
- The unique method signature as defined by
ByteCodeMethod.getUniqueSignature()
of the method that is to be invoked.Copyright © 2014. All rights reserved.