Top Description Inners Methods
net.bytebuddy.implementation.bind.annotation

public @Interface Pipe

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:PARAMETER
Imports
net.bytebuddy.ByteBuddy, .ClassFileVersion, net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.description.annotation.AnnotationDescription, net.bytebuddy.description.field.FieldDescription, .FieldList, net.bytebuddy.description.method.MethodDescription, .MethodList, .ParameterDescription, net.bytebuddy.description.modifier.Visibility, net.bytebuddy.description.type.TypeDescription, .TypeList, net.bytebuddy.dynamic.DynamicType, net.bytebuddy.dynamic.scaffold.InstrumentedType, .TypeValidation, net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy, net.bytebuddy.implementation.Implementation, .MethodAccessorFactory, net.bytebuddy.implementation.auxiliary.AuxiliaryType, net.bytebuddy.implementation.bind.MethodDelegationBinder, net.bytebuddy.implementation.bytecode.ByteCodeAppender, .Duplication, .StackManipulation, .TypeCreation, net.bytebuddy.implementation.bytecode.assign.Assigner, net.bytebuddy.implementation.bytecode.member.FieldAccess, .MethodInvocation, .MethodReturn, .MethodVariableAccess, net.bytebuddy.matcher.ElementMatchers, net.bytebuddy.utility.RandomString, net.bytebuddy.jar.asm.MethodVisitor, java.io.Serializable, java.lang.annotation.*, java.util.LinkedHashMap, .Map

A target method parameter that is annotated with this annotation allows to forward an intercepted method invocation to another instance. The instance to which a method call is forwarded must be of the most specific type that declares the intercepted method on the intercepted type.

Unfortunately, before Java 8, the Java Class Library does not define any interface type which takes a single java.lang.Object type and returns another java.lang.Object type. For this reason, a net.bytebuddy.implementation.bind.annotation.Pipe.Binder needs to be installed explicitly and registered on a net.bytebuddy.implementation.MethodDelegation. The installed type is allowed to be an interface without any super types that declares a single method which maps an java.lang.Object type to a another java.lang.Object type as a result value. It is however not prohibited to use generics in the process.

See Also
net.bytebuddy.implementation.MethodDelegation, net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the generated proxy should be java.io.Serializable.
serializableProxy
()

Determines if the generated proxy should be java.io.Serializable.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

serializableProxyback to summary
public boolean serializableProxy()

Determines if the generated proxy should be java.io.Serializable.

Returns:boolean

true if the generated proxy should be java.io.Serializable.

net.bytebuddy.implementation.bind.annotation back to summary

public Class Pipe.Binder

extends Object
implements TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
Annotations
@Enhance

A net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder for binding the net.bytebuddy.implementation.bind.annotation.Pipe annotation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
Pipe.Binder.RedirectionProxy

An auxiliary type for performing the redirection of a method invocation as requested by the net.bytebuddy.implementation.bind.annotation.Pipe annotation.

Field Summary

Modifier and TypeField and Description
private final MethodDescription
forwardingMethod

The method which implements the behavior of forwarding a method invocation.

private static final MethodDescription.InDefinedShape
SERIALIZABLE_PROXY

A description of the Pipe#serializableProxy() method.

Constructor Summary

AccessConstructor and Description
protected
Binder(MethodDescription
The method which implements the behavior of forwarding a method invocation. This method needs to define a single non-static method with an java.lang.Object to java.lang.Object mapping.
forwardingMethod
)

Creates a new binder.

Method Summary

Modifier and TypeMethod and Description
public MethodDelegationBinder.ParameterBinding<?>
bind(AnnotationDescription.Loadable<Pipe>
The annotation that was cause for the delegation to this argument binder.
annotation
,
MethodDescription
The intercepted source method.
source
,
ParameterDescription
Tge target parameter that is subject to be bound to intercepting the source method.
target
,
Implementation.Target
The target of the current implementation that is subject to this binding.
implementationTarget
,
Assigner
An assigner that can be used for applying the binding.
assigner
,
Assigner.Typing
The typing to apply.
typing
)

Implements net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.bind.

Creates a parameter binding for the given target parameter.
public Class<Pipe>
public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>

Returns:

A binder for the net.bytebuddy.implementation.bind.annotation.Pipe annotation.
install
(Class<?>
The type to install.
type
)

Installs a given type for use on a net.bytebuddy.implementation.bind.annotation.Pipe annotation.

public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>

Returns:

A binder for the net.bytebuddy.implementation.bind.annotation.Pipe annotation.
install
(TypeDescription
The type to install.
typeDescription
)

Installs a given type for use on a net.bytebuddy.implementation.bind.annotation.Pipe annotation.

private static MethodDescription

Returns:

Its only method after validation.
onlyMethod
(TypeDescription
The type that is being installed.
typeDescription
)

Locates the only method of a type that is compatible to being overridden for invoking the proxy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

forwardingMethodback to summary
private final MethodDescription forwardingMethod

The method which implements the behavior of forwarding a method invocation. This method needs to define a single non-static method with an java.lang.Object to java.lang.Object mapping.

SERIALIZABLE_PROXYback to summary
private static final MethodDescription.InDefinedShape SERIALIZABLE_PROXY

A description of the Pipe#serializableProxy() method.

Constructor Detail

Binderback to summary
protected Binder(MethodDescription forwardingMethod)

Creates a new binder. This constructor is not doing any validation of the forwarding method and its declaring type. Such validation is normally performed by the net.bytebuddy.implementation.bind.annotation.Pipe.Binder#install(Class) method.

Parameters
forwardingMethod:MethodDescription

The method which implements the behavior of forwarding a method invocation. This method needs to define a single non-static method with an java.lang.Object to java.lang.Object mapping.

Method Detail

bindback to summary
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Pipe> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing)

Implements net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.bind.

Doc from net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.bind.

Creates a parameter binding for the given target parameter.

Parameters
annotation:AnnotationDescription.Loadable<Pipe>

The annotation that was cause for the delegation to this argument binder.

source:MethodDescription

The intercepted source method.

target:ParameterDescription

Tge target parameter that is subject to be bound to intercepting the source method.

implementationTarget:Implementation.Target

The target of the current implementation that is subject to this binding.

assigner:Assigner

An assigner that can be used for applying the binding.

typing:Assigner.Typing

The typing to apply.

Returns:MethodDelegationBinder.ParameterBinding<?>

A parameter binding for the requested target method parameter.

getHandledTypeback to summary
public Class<Pipe> getHandledType()

Implements net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.getHandledType.

Doc from net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.getHandledType.

The annotation type that is handled by this parameter binder.

Returns:Class<Pipe>

The java.lang.annotation.Annotation#annotationType() handled by this parameter binder.

installback to summary
public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install(Class<?> type)

Installs a given type for use on a net.bytebuddy.implementation.bind.annotation.Pipe annotation. The given type must be an interface without any super interfaces and a single method which maps an java.lang.Object type to another java.lang.Object type. The use of generics is permitted.

Parameters
type:Class<?>

The type to install.

Returns:TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>

A binder for the net.bytebuddy.implementation.bind.annotation.Pipe annotation.

installback to summary
public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install(TypeDescription typeDescription)

Installs a given type for use on a net.bytebuddy.implementation.bind.annotation.Pipe annotation. The given type must be an interface without any super interfaces and a single method which maps an java.lang.Object type to another java.lang.Object type. The use of generics is permitted.

Parameters
typeDescription:TypeDescription

The type to install.

Returns:TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>

A binder for the net.bytebuddy.implementation.bind.annotation.Pipe annotation.

onlyMethodback to summary
private static MethodDescription onlyMethod(TypeDescription typeDescription)

Locates the only method of a type that is compatible to being overridden for invoking the proxy.

Parameters
typeDescription:TypeDescription

The type that is being installed.

Returns:MethodDescription

Its only method after validation.

net.bytebuddy.implementation.bind.annotation back to summary

protected Class Pipe.Binder.RedirectionProxy

extends AbstractBase
implements AuxiliaryType
Class Inheritance
All Implemented Interfaces
net.bytebuddy.implementation.auxiliary.AuxiliaryType
Annotations
@Enhance

An auxiliary type for performing the redirection of a method invocation as requested by the net.bytebuddy.implementation.bind.annotation.Pipe annotation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static enum
Pipe.Binder.RedirectionProxy.ConstructorCall

The implementation to implement a RedirectionProxy's constructor.

protected static class
Pipe.Binder.RedirectionProxy.MethodCall

The implementation to implement a RedirectionProxy's forwarding method.

Field Summary

Modifier and TypeField and Description
private final Assigner
assigner

The assigner to use.

private static final String
FIELD_NAME_PREFIX

The prefix for naming fields to store method arguments.

private final TypeDescription
forwardingType

The type that declares the method for forwarding a method invocation.

private final boolean
serializableProxy

Determines if the generated proxy should be java.io.Serializable.

private final MethodDescription
sourceMethod

The method that is to be forwarded.

Constructor Summary

AccessConstructor and Description
protected
RedirectionProxy(TypeDescription
The type that declares the method for forwarding a method invocation.
forwardingType
,
MethodDescription
The method that is to be forwarded.
sourceMethod
,
Assigner
The assigner to use.
assigner
,
boolean
Determines if the generated proxy should be java.io.Serializable.
serializableProxy
)

Creates a new redirection.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation.Size
apply(MethodVisitor
The method visitor used to write the method implementation to.
methodVisitor
,
Implementation.Context
The context of the current implementation.
implementationContext
)

Implements net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
private static LinkedHashMap<String, TypeDescription>

Returns:

A linked hash map of field names to the types of these fields representing all parameters of the given method.
extractFields
(MethodDescription
The method to extract the parameters from.
methodDescription
)

Extracts all parameters of a method to fields.

private static String

Returns:

The field name that corresponds to the index.
fieldName
(int
The index of the field.
index
)

Creates a new field name.

public String
getSuffix()

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.getSuffix.

Produces a suffix that gives this auxiliary type a stable name.
public DynamicType
make(String
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.
auxiliaryTypeName
,
ClassFileVersion
The class file version the auxiliary class should be written in.
classFileVersion
,
MethodAccessorFactory
A factory for accessor methods.
methodAccessorFactory
)

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.make.

Creates a new auxiliary type.
Inherited from net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase:
isValid

Field Detail

assignerback to summary
private final Assigner assigner

The assigner to use.

FIELD_NAME_PREFIXback to summary
private static final String FIELD_NAME_PREFIX

The prefix for naming fields to store method arguments.

forwardingTypeback to summary
private final TypeDescription forwardingType

The type that declares the method for forwarding a method invocation.

serializableProxyback to summary
private final boolean serializableProxy

Determines if the generated proxy should be java.io.Serializable.

sourceMethodback to summary
private final MethodDescription sourceMethod

The method that is to be forwarded.

Constructor Detail

RedirectionProxyback to summary
protected RedirectionProxy(TypeDescription forwardingType, MethodDescription sourceMethod, Assigner assigner, boolean serializableProxy)

Creates a new redirection.

Parameters
forwardingType:TypeDescription

The type that declares the method for forwarding a method invocation.

sourceMethod:MethodDescription

The method that is to be forwarded.

assigner:Assigner

The assigner to use.

serializableProxy:boolean

Determines if the generated proxy should be java.io.Serializable.

Method Detail

applyback to summary
public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)

Implements net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.

Parameters
methodVisitor:MethodVisitor

The method visitor used to write the method implementation to.

implementationContext:Implementation.Context

The context of the current implementation.

Returns:StackManipulation.Size

The changes to the size of the operand stack that are implied by this stack manipulation.

extractFieldsback to summary
private static LinkedHashMap<String, TypeDescription> extractFields(MethodDescription methodDescription)

Extracts all parameters of a method to fields.

Parameters
methodDescription:MethodDescription

The method to extract the parameters from.

Returns:LinkedHashMap<String, TypeDescription>

A linked hash map of field names to the types of these fields representing all parameters of the given method.

fieldNameback to summary
private static String fieldName(int index)

Creates a new field name.

Parameters
index:int

The index of the field.

Returns:String

The field name that corresponds to the index.

getSuffixback to summary
public String getSuffix()

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.getSuffix.

Doc from net.bytebuddy.implementation.auxiliary.AuxiliaryType.getSuffix.

Produces a suffix that gives this auxiliary type a stable name. A best effort is made that this suffix is unique.

Returns:String

The suffix for this auxiliary type.

makeback to summary
public DynamicType make(String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)

Implements net.bytebuddy.implementation.auxiliary.AuxiliaryType.make.

Doc from net.bytebuddy.implementation.auxiliary.AuxiliaryType.make.

Creates a new auxiliary type.

Parameters
auxiliaryTypeName:String

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:ClassFileVersion

The class file version the auxiliary class should be written in.

methodAccessorFactory:MethodAccessorFactory

A factory for accessor methods.

Returns:DynamicType

A dynamically created type representing this auxiliary type.

net.bytebuddy.implementation.bind.annotation back to summary

protected final Enum Pipe.Binder.RedirectionProxy.ConstructorCall

extends Enum<Pipe.Binder.RedirectionProxy.ConstructorCall>
implements Implementation
Class Inheritance
All Implemented Interfaces
net.bytebuddy.implementation.Implementation, net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable

The implementation to implement a RedirectionProxy's constructor.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public static final Pipe.Binder.RedirectionProxy.ConstructorCall
INSTANCE

The singleton instance.

private final transient MethodDescription.InDefinedShape
objectTypeDefaultConstructor

A reference of the Object type default constructor.

Constructor Summary

AccessConstructor and Description
private
ConstructorCall()

Creates the constructor call singleton.

Method Summary

Modifier and TypeMethod and Description
public ByteCodeAppender
appender(Implementation.Target
The target of the current implementation.
implementationTarget
)

Implements net.bytebuddy.implementation.Implementation.appender.

Creates a byte code appender that determines the implementation of the instrumented type's methods.
public InstrumentedType
prepare(InstrumentedType
The instrumented type in its current form.
instrumentedType
)

Implements net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Prepares a given instrumented type.
public static Pipe.Binder.RedirectionProxy.ConstructorCall
public static Pipe.Binder.RedirectionProxy.ConstructorCall[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final Pipe.Binder.RedirectionProxy.ConstructorCall INSTANCE

The singleton instance.

objectTypeDefaultConstructorback to summary
private final transient MethodDescription.InDefinedShape objectTypeDefaultConstructor

A reference of the Object type default constructor.

Constructor Detail

ConstructorCallback to summary
private ConstructorCall()

Creates the constructor call singleton.

Method Detail

appenderback to summary
public ByteCodeAppender appender(Implementation.Target implementationTarget)

Implements net.bytebuddy.implementation.Implementation.appender.

Doc from net.bytebuddy.implementation.Implementation.appender.

Creates a byte code appender that determines the implementation of the instrumented type's methods.

Parameters
implementationTarget:Implementation.Target

The target of the current implementation.

Returns:ByteCodeAppender

A byte code appender for implementing methods delegated to this implementation. This byte code appender is also responsible for handling methods that were added by this implementation on the call to Implementation#prepare(InstrumentedType).

prepareback to summary
public InstrumentedType prepare(InstrumentedType instrumentedType)

Implements net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Doc from net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Prepares a given instrumented type.

Parameters
instrumentedType:InstrumentedType

The instrumented type in its current form.

Returns:InstrumentedType

The prepared instrumented type.

valueOfback to summary
public static Pipe.Binder.RedirectionProxy.ConstructorCall valueOf(String name)
valuesback to summary
public static Pipe.Binder.RedirectionProxy.ConstructorCall[] values()
net.bytebuddy.implementation.bind.annotation back to summary

private Class Pipe.Binder.RedirectionProxy.ConstructorCall.Appender

extends Object
implements ByteCodeAppender
Class Inheritance
  • java.lang.Object
  • net.bytebuddy.implementation.bind.annotation.Pipe.Binder.RedirectionProxy.ConstructorCall.Appender
All Implemented Interfaces
net.bytebuddy.implementation.bytecode.ByteCodeAppender
Annotations
@Enhance

The appender for implementing the RedirectionProxy.ConstructorCall.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
instrumentedType

The instrumented type being created.

Constructor Summary

AccessConstructor and Description
private
Appender(TypeDescription
The instrumented type that is being created.
instrumentedType
)

Creates a new appender.

Method Summary

Modifier and TypeMethod and Description
public ByteCodeAppender.Size
apply(MethodVisitor
The method visitor to which the byte code appender writes its code to.
methodVisitor
,
Implementation.Context
The implementation context of the current type creation process.
implementationContext
,
MethodDescription
The method that is the target of the instrumentation.
instrumentedMethod
)

Implements net.bytebuddy.implementation.bytecode.ByteCodeAppender.apply.

Applies this byte code appender to a type creation process.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instrumentedTypeback to summary
private final TypeDescription instrumentedType

The instrumented type being created.

Constructor Detail

Appenderback to summary
private Appender(TypeDescription instrumentedType)

Creates a new appender.

Parameters
instrumentedType:TypeDescription

The instrumented type that is being created.

Method Detail

applyback to summary
public ByteCodeAppender.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)

Implements net.bytebuddy.implementation.bytecode.ByteCodeAppender.apply.

Doc from net.bytebuddy.implementation.bytecode.ByteCodeAppender.apply.

Applies this byte code appender to a type creation process.

Parameters
methodVisitor:MethodVisitor

The method visitor to which the byte code appender writes its code to.

implementationContext:Implementation.Context

The implementation context of the current type creation process.

instrumentedMethod:MethodDescription

The method that is the target of the instrumentation.

Returns:ByteCodeAppender.Size

The required size for the applied byte code to run.

net.bytebuddy.implementation.bind.annotation back to summary

protected Class Pipe.Binder.RedirectionProxy.MethodCall

extends Object
implements Implementation
Class Inheritance
  • java.lang.Object
  • net.bytebuddy.implementation.bind.annotation.Pipe.Binder.RedirectionProxy.MethodCall
All Implemented Interfaces
net.bytebuddy.implementation.Implementation, net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
Annotations
@Enhance

The implementation to implement a RedirectionProxy's forwarding method.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final Assigner
assigner

The assigner to be used for invoking the forwarded method.

private final MethodDescription
redirectedMethod

The method that is invoked by the implemented method.

Constructor Summary

AccessConstructor and Description
private
MethodCall(MethodDescription
The method that is invoked by the implemented method.
redirectedMethod
,
Assigner
The assigner to be used for invoking the forwarded method.
assigner
)

Creates a new method call implementation.

Method Summary

Modifier and TypeMethod and Description
public ByteCodeAppender
appender(Implementation.Target
The target of the current implementation.
implementationTarget
)

Implements net.bytebuddy.implementation.Implementation.appender.

Creates a byte code appender that determines the implementation of the instrumented type's methods.
public InstrumentedType
prepare(InstrumentedType
The instrumented type in its current form.
instrumentedType
)

Implements net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Prepares a given instrumented type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

assignerback to summary
private final Assigner assigner

The assigner to be used for invoking the forwarded method.

redirectedMethodback to summary
private final MethodDescription redirectedMethod

The method that is invoked by the implemented method.

Constructor Detail

MethodCallback to summary
private MethodCall(MethodDescription redirectedMethod, Assigner assigner)

Creates a new method call implementation.

Parameters
redirectedMethod:MethodDescription

The method that is invoked by the implemented method.

assigner:Assigner

The assigner to be used for invoking the forwarded method.

Method Detail

appenderback to summary
public ByteCodeAppender appender(Implementation.Target implementationTarget)

Implements net.bytebuddy.implementation.Implementation.appender.

Doc from net.bytebuddy.implementation.Implementation.appender.

Creates a byte code appender that determines the implementation of the instrumented type's methods.

Parameters
implementationTarget:Implementation.Target

The target of the current implementation.

Returns:ByteCodeAppender

A byte code appender for implementing methods delegated to this implementation. This byte code appender is also responsible for handling methods that were added by this implementation on the call to Implementation#prepare(InstrumentedType).

prepareback to summary
public InstrumentedType prepare(InstrumentedType instrumentedType)

Implements net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Doc from net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable.prepare.

Prepares a given instrumented type.

Parameters
instrumentedType:InstrumentedType

The instrumented type in its current form.

Returns:InstrumentedType

The prepared instrumented type.

net.bytebuddy.implementation.bind.annotation back to summary

private Class Pipe.Binder.RedirectionProxy.MethodCall.Appender

extends Object
implements ByteCodeAppender
Class Inheritance
  • java.lang.Object
  • net.bytebuddy.implementation.bind.annotation.Pipe.Binder.RedirectionProxy.MethodCall.Appender
All Implemented Interfaces
net.bytebuddy.implementation.bytecode.ByteCodeAppender
Annotations
@Enhance
includeSyntheticFields:true

The appender for implementing the RedirectionProxy.MethodCall.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
instrumentedType

The instrumented type that is implemented.

Constructor Summary

AccessConstructor and Description
private
Appender(TypeDescription
The instrumented type to be implemented.
instrumentedType
)

Creates a new appender.

Method Summary

Modifier and TypeMethod and Description
public ByteCodeAppender.Size
apply(MethodVisitor
The method visitor to which the byte code appender writes its code to.
methodVisitor
,
Implementation.Context
The implementation context of the current type creation process.
implementationContext
,
MethodDescription
The method that is the target of the instrumentation.
instrumentedMethod
)

Implements net.bytebuddy.implementation.bytecode.ByteCodeAppender.apply.

Applies this byte code appender to a type creation process.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instrumentedTypeback to summary
private final TypeDescription instrumentedType

The instrumented type that is implemented.

Constructor Detail

Appenderback to summary
private Appender(TypeDescription instrumentedType)

Creates a new appender.

Parameters
instrumentedType:TypeDescription

The instrumented type to be implemented.

Method Detail

applyback to summary
public ByteCodeAppender.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)

Implements net.bytebuddy.implementation.bytecode.ByteCodeAppender.apply.

Doc from net.bytebuddy.implementation.bytecode.ByteCodeAppender.apply.

Applies this byte code appender to a type creation process.

Parameters
methodVisitor:MethodVisitor

The method visitor to which the byte code appender writes its code to.

implementationContext:Implementation.Context

The implementation context of the current type creation process.

instrumentedMethod:MethodDescription

The method that is the target of the instrumentation.

Returns:ByteCodeAppender.Size

The required size for the applied byte code to run.