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

public @Interface AllArguments

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:PARAMETER
Imports
org.easymock.bytebuddy.description.annotation.AnnotationDescription, org.easymock.bytebuddy.description.method.MethodDescription, .MethodList, .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.collection.ArrayFactory, org.easymock.bytebuddy.implementation.bytecode.constant.NullConstant, org.easymock.bytebuddy.implementation.bytecode.member.MethodVariableAccess, org.easymock.bytebuddy.utility.CompoundList, java.lang.annotation.*, java.util.ArrayList, .List

Parameters that are annotated with this annotation will be assigned an array of all arguments of the instrumented method.

By default, this annotation applies a org.easymock.bytebuddy.implementation.bind.annotation.AllArguments.Assignment#STRICT assignment of the source method's parameters to the array. This implies that parameters that are not assignable to the annotated array's component type make the method with this parameter unbindable. To avoid this, you can use a org.easymock.bytebuddy.implementation.bind.annotation.AllArguments.Assignment#SLACK assignment which simply skips non-assignable values instead.

Important Note

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

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
AllArguments.Assignment

A directive for how an org.easymock.bytebuddy.implementation.bind.annotation.AllArguments annotation on an array is to be interpreted.

public static enum

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the instance on which the intercepted method should be invoked should be included in the array containing the arguments.
includeSelf
()

Determines if the array should contain the instance that defines the intercepted value when intercepting a non-static method.

public boolean

Returns:

true if a null value should be assigned if the instrumented method does not declare any parameters.
nullIfEmpty
()

Determines if a null value should be assigned if the instrumented method does not declare any parameters.

public AllArguments.Assignment

Returns:

The assignment handling to be applied for the annotated parameter.
value
()

Defines the type of org.easymock.bytebuddy.implementation.bind.annotation.AllArguments.Assignment type that is applied for filling the annotated array with values.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

includeSelfback to summary
public boolean includeSelf()

Determines if the array should contain the instance that defines the intercepted value when intercepting a non-static method.

Returns:boolean

true if the instance on which the intercepted method should be invoked should be included in the array containing the arguments.

nullIfEmptyback to summary
public boolean nullIfEmpty()

Determines if a null value should be assigned if the instrumented method does not declare any parameters.

Returns:boolean

true if a null value should be assigned if the instrumented method does not declare any parameters.

valueback to summary
public AllArguments.Assignment value()

Defines the type of org.easymock.bytebuddy.implementation.bind.annotation.AllArguments.Assignment type that is applied for filling the annotated array with values.

Returns:AllArguments.Assignment

The assignment handling to be applied for the annotated parameter.

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

public final Enum AllArguments.Assignment

extends Enum<AllArguments.Assignment>
Class Inheritance

A directive for how an org.easymock.bytebuddy.implementation.bind.annotation.AllArguments annotation on an array is to be interpreted.

Field Summary

Modifier and TypeField and Description
public static final AllArguments.Assignment
SLACK

Other than a org.easymock.bytebuddy.implementation.bind.annotation.AllArguments.Assignment#STRICT assignment, a slack assignment simply ignores non-bindable parameters and does not include them in the target array.

public static final AllArguments.Assignment
STRICT

A strict assignment attempts to include all parameter values of the source method.

private final boolean
strict

Determines if this assignment is strict.

Constructor Summary

AccessConstructor and Description
private
Assignment(boolean
true if this assignment is strict.
strict
)

Creates a new assignment type.

Method Summary

Modifier and TypeMethod and Description
protected boolean

Returns:

true if this assignment is strict.
isStrict
()

Returns true if this assignment is strict.

public static AllArguments.Assignment
public static AllArguments.Assignment[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

SLACKback to summary
public static final AllArguments.Assignment SLACK

Other than a org.easymock.bytebuddy.implementation.bind.annotation.AllArguments.Assignment#STRICT assignment, a slack assignment simply ignores non-bindable parameters and does not include them in the target array. In the most extreme case where no source method parameter is assignable to the component type of the annotated array, the array that is assigned to the target parameter is empty.

STRICTback to summary
public static final AllArguments.Assignment STRICT

A strict assignment attempts to include all parameter values of the source method. If only one of these parameters is not assignable to the component type of the annotated array, the method is considered as non-bindable.

strictback to summary
private final boolean strict

Determines if this assignment is strict.

Constructor Detail

Assignmentback to summary
private Assignment(boolean strict)

Creates a new assignment type.

Parameters
strict:boolean

true if this assignment is strict.

Method Detail

isStrictback to summary
protected boolean isStrict()

Returns true if this assignment is strict.

Returns:boolean

true if this assignment is strict.

valueOfback to summary
public static AllArguments.Assignment valueOf(String name)
valuesback to summary
public static AllArguments.Assignment[] values()
org.easymock.bytebuddy.implementation.bind.annotation back to summary

public final Enum AllArguments.Binder

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

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

Field Summary

Modifier and TypeField and Description
private static final MethodDescription.InDefinedShape
INCLUDE_SELF

A description of the AllArguments#includeSelf() method.

public static final AllArguments.Binder
INSTANCE

The singleton instance.

private static final MethodDescription.InDefinedShape
NULL_IF_EMPTY

A description of the AllArguments#nullIfEmpty() method.

private static final MethodDescription.InDefinedShape
VALUE

A description of the AllArguments#value() method.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MethodDelegationBinder.ParameterBinding<?>
bind(AnnotationDescription.Loadable<AllArguments>
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<AllArguments>
public static AllArguments.Binder
public static AllArguments.Binder[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INCLUDE_SELFback to summary
private static final MethodDescription.InDefinedShape INCLUDE_SELF

A description of the AllArguments#includeSelf() method.

INSTANCEback to summary
public static final AllArguments.Binder INSTANCE

The singleton instance.

NULL_IF_EMPTYback to summary
private static final MethodDescription.InDefinedShape NULL_IF_EMPTY

A description of the AllArguments#nullIfEmpty() method.

VALUEback to summary
private static final MethodDescription.InDefinedShape VALUE

A description of the AllArguments#value() method.

Constructor Detail

Binderback to summary
private Binder()

Method Detail

bindback to summary
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<AllArguments> 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<AllArguments>

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<AllArguments> 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<AllArguments>

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

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