protected static class Morph.Binder.RedirectionProxy extends Object implements AuxiliaryType, StackManipulation
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Morph.Binder.RedirectionProxy.InstanceFieldConstructor
Creates an instance of the proxy when instrumenting an instance method.
|
protected static class |
Morph.Binder.RedirectionProxy.MethodCall
Implements a the method call of the morphing method.
|
protected static class |
Morph.Binder.RedirectionProxy.StaticFieldConstructor
Creates an instance of the proxy when instrumenting a static method.
|
AuxiliaryType.MethodAccessorFactory, AuxiliaryType.NamingStrategyStackManipulation.Compound, StackManipulation.Illegal, StackManipulation.LegalTrivial, StackManipulation.Size| Modifier and Type | Field and Description |
|---|---|
protected static String |
FIELD_NAME
The name of the field that carries an instance for invoking a super method on.
|
DEFAULT_TYPE_MODIFIER| Modifier | Constructor and Description |
|---|---|
protected |
RedirectionProxy(TypeDescription morphingType,
TypeDescription instrumentedType,
Implementation.SpecialMethodInvocation specialMethodInvocation,
Assigner assigner,
boolean serializableProxy,
MethodLookupEngine.Factory methodLookupEngineFactory)
Creates a new redirection proxy.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
isValid()
Determines if this stack manipulation is valid.
|
DynamicType |
make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
Creates a new auxiliary type.
|
String |
toString() |
protected static final String FIELD_NAME
protected RedirectionProxy(TypeDescription morphingType, TypeDescription instrumentedType, Implementation.SpecialMethodInvocation specialMethodInvocation, Assigner assigner, boolean serializableProxy, MethodLookupEngine.Factory methodLookupEngineFactory)
morphingType - The interface type that is implemented by the generated proxy.instrumentedType - The type that is instrumented on which the super method is invoked.specialMethodInvocation - The special method invocation to be executed by the morphing type via
an accessor on the instrumented type.assigner - The assigner to use.serializableProxy - true if the proxy should be serializable.methodLookupEngineFactory - The method lookup engine factory to use.public DynamicType make(String auxiliaryTypeName, ClassFileVersion classFileVersion, AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
AuxiliaryTypemake in interface AuxiliaryTypeauxiliaryTypeName - The fully qualified non-internal name for this auxiliary type. The type should be in
the same package than the instrumented type this auxiliary type is providing services
to in order to allow package-private access.classFileVersion - The class file version the auxiliary class should be written in.methodAccessorFactory - A factory for accessor methods.public boolean isValid()
StackManipulationisValid in interface StackManipulationfalse, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)
StackManipulationapply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.implementationContext - The context of the current implementation.Copyright © 2014–2015. All rights reserved.