Class Pipe.Binder.Redirection
- java.lang.Object
-
- net.bytebuddy.implementation.bind.annotation.Pipe.Binder.Redirection
-
- All Implemented Interfaces:
AuxiliaryType,StackManipulation
- Enclosing class:
- Pipe.Binder
protected static class Pipe.Binder.Redirection extends java.lang.Object implements AuxiliaryType, StackManipulation
An auxiliary type for performing the redirection of a method invocation as requested by thePipeannotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPipe.Binder.Redirection.ConstructorCallThe implementation to implement aPipe.Binder.Redirection's constructor.protected static classPipe.Binder.Redirection.MethodCallThe implementation to implement aPipe.Binder.Redirection's forwarding method.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType
AuxiliaryType.NamingStrategy, AuxiliaryType.SignatureRelevant
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Size, StackManipulation.Trivial
-
-
Field Summary
-
Fields inherited from interface net.bytebuddy.implementation.auxiliary.AuxiliaryType
DEFAULT_TYPE_MODIFIER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRedirection(TypeDescription forwardingType, MethodDescription sourceMethod, Assigner assigner, boolean serializableProxy)Creates a new redirection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation.Sizeapply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)Applies the stack manipulation that is described by this instance.booleanisValid()Determines if this stack manipulation is valid.DynamicTypemake(java.lang.String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)Creates a new auxiliary type.
-
-
-
Constructor Detail
-
Redirection
protected Redirection(TypeDescription forwardingType, MethodDescription sourceMethod, Assigner assigner, boolean serializableProxy)
Creates a new redirection.- Parameters:
forwardingType- The type that declares the method for forwarding a method invocation.sourceMethod- The method that is to be forwarded.assigner- The assigner to use.serializableProxy- Determines if the generated proxy should beSerializable.
-
-
Method Detail
-
make
public DynamicType make(java.lang.String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)
Description copied from interface:AuxiliaryTypeCreates a new auxiliary type.- Specified by:
makein interfaceAuxiliaryType- Parameters:
auxiliaryTypeName- The fully qualified binary 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.- Returns:
- A dynamically created type representing this auxiliary type.
-
isValid
public boolean isValid()
Description copied from interface:StackManipulationDetermines if this stack manipulation is valid.- Specified by:
isValidin interfaceStackManipulation- Returns:
- If
false, this manipulation cannot be applied and should throw an exception.
-
apply
public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
Description copied from interface:StackManipulationApplies the stack manipulation that is described by this instance.- Specified by:
applyin interfaceStackManipulation- Parameters:
methodVisitor- The method visitor used to write the method implementation to.implementationContext- The context of the current implementation.- Returns:
- The changes to the size of the operand stack that are implied by this stack manipulation.
-
-