public class SubclassInstrumentationContextDelegate extends Object implements AuxiliaryType.MethodAccessorFactory, Instrumentation.Context.Default.AuxiliaryTypeNamingStrategy, TypeWriter.MethodPool
TypeWriter.MethodPool.Entry
Modifier and Type | Field and Description |
---|---|
static String |
ABSTRACT_METHOD_WARNING_PREFIX
The prefix for exceptions that are thrown on
|
Constructor and Description |
---|
SubclassInstrumentationContextDelegate(InstrumentedType instrumentedType,
BridgeMethodResolver.Factory bridgeMethodResolverFactory)
Creates a new delegate with a default prefix.
|
SubclassInstrumentationContextDelegate(InstrumentedType instrumentedType,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
String prefix)
Creates a new delegate.
|
Modifier and Type | Method and Description |
---|---|
Iterable<MethodDescription> |
getProxiedMethods()
Returns an iterable containing all accessor methods that were registered with this delegate.
|
String |
name(AuxiliaryType auxiliaryType)
NAmes an auxiliary type.
|
MethodDescription |
requireAccessorMethodFor(MethodDescription targetMethod)
Requests a new accessor method for the requested method.
|
TypeWriter.MethodPool.Entry |
target(MethodDescription methodDescription)
Looks up a handler entry for a given method.
|
String |
toString() |
public static final String ABSTRACT_METHOD_WARNING_PREFIX
public SubclassInstrumentationContextDelegate(InstrumentedType instrumentedType, BridgeMethodResolver.Factory bridgeMethodResolverFactory)
instrumentedType
- The instrumented type that is subject of the instrumentation.bridgeMethodResolverFactory
- A factory that is used for creating a bridge method resolver for the given
instrumented type.public SubclassInstrumentationContextDelegate(InstrumentedType instrumentedType, BridgeMethodResolver.Factory bridgeMethodResolverFactory, String prefix)
instrumentedType
- The instrumented type that is subject of the instrumentation.bridgeMethodResolverFactory
- A factory that is used for creating a bridge method resolver for the given
instrumented type.prefix
- The prefix to be used for the delegation methods.public String name(AuxiliaryType auxiliaryType)
Instrumentation.Context.Default.AuxiliaryTypeNamingStrategy
name
in interface Instrumentation.Context.Default.AuxiliaryTypeNamingStrategy
auxiliaryType
- The auxiliary type to name.public MethodDescription requireAccessorMethodFor(MethodDescription targetMethod)
AuxiliaryType.MethodAccessorFactory
requireAccessorMethodFor
in interface AuxiliaryType.MethodAccessorFactory
targetMethod
- The target method for which an accessor method is required.public Iterable<MethodDescription> getProxiedMethods()
public TypeWriter.MethodPool.Entry target(MethodDescription methodDescription)
TypeWriter.MethodPool
target
in interface TypeWriter.MethodPool
methodDescription
- The method being processed.Copyright © 2014. All rights reserved.