Top Description Inners Methods
org.easymock.bytebuddy.implementation.bind.annotation

public @Interface This

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:PARAMETER
Imports
org.easymock.bytebuddy.description.annotation.AnnotationDescription, org.easymock.bytebuddy.description.method.MethodDescription, .ParameterDescription, org.easymock.bytebuddy.description.type.TypeDescription, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.implementation.bind.MethodDelegationBinder, org.easymock.bytebuddy.implementation.bytecode.StackManipulation, org.easymock.bytebuddy.implementation.bytecode.assign.Assigner, org.easymock.bytebuddy.implementation.bytecode.constant.NullConstant, org.easymock.bytebuddy.implementation.bytecode.member.MethodVariableAccess, java.lang.annotation.*

Parameters that are annotated with this annotation will be assigned a reference to the instrumented object, if the instrumented method is not static. Otherwise, the method with this parameter annotation will be excluded from the list of possible binding candidates of the static source method.

Important Note

Don't confuse this annotation with org.easymock.bytebuddy.asm.Advice.This or org.easymock.bytebuddy.asm.MemberSubstitution.This. This annotation should be used with org.easymock.bytebuddy.implementation.MethodDelegation only.

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the annotated parameter should be bound to null as a fallback.
optional
()

Determines if the annotated parameter should be bound to null when intercepting a static method.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

optionalback to summary
public boolean optional()

Determines if the annotated parameter should be bound to null when intercepting a static method.

Returns:boolean

true if the annotated parameter should be bound to null as a fallback.

org.easymock.bytebuddy.implementation.bind.annotation back to summary

public final Enum This.Binder

extends Enum<This.Binder>
implements TargetMethodAnnotationDrivenBinder.ParameterBinder<This>
Class Inheritance
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder

A binder for handling the org.easymock.bytebuddy.implementation.bind.annotation.This annotation.
See Also
TargetMethodAnnotationDrivenBinder

Field Summary

Modifier and TypeField and Description
public static final This.Binder
INSTANCE

The singleton instance.

private static final MethodDescription.InDefinedShape
OPTIONAL

A description of the Pipe#serializableProxy() method.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MethodDelegationBinder.ParameterBinding<?>
bind(AnnotationDescription.Loadable<This>
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 org.easymock.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.bind.

Creates a parameter binding for the given target parameter.
public Class<This>
public static This.Binder
public static This.Binder[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final This.Binder INSTANCE

The singleton instance.

OPTIONALback to summary
private static final MethodDescription.InDefinedShape OPTIONAL

A description of the Pipe#serializableProxy() method.

Constructor Detail

Binderback to summary
private Binder()

Method Detail

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

Implements org.easymock.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.bind.

Doc from org.easymock.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.bind.

Creates a parameter binding for the given target parameter.

Parameters
annotation:AnnotationDescription.Loadable<This>

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<This> getHandledType()

Implements org.easymock.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.getHandledType.

Doc from org.easymock.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.getHandledType.

The annotation type that is handled by this parameter binder.

Returns:Class<This>

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

valueOfback to summary
public static This.Binder valueOf(String name)
valuesback to summary
public static This.Binder[] values()