U - The bound annotation's type.public static class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue.OfConstant<U extends Annotation> extends TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<U>
A parameter binder that binds a fixed value to a parameter annotation when using a MethodDelegation.
This binder is only capable to store
values that can either be expressed as Java byte code or as a constant pool value. This includes primitive types, String values,
Class values which can also be expressed as TypeDescription instances or method handles and method types for classes of
a version at least of Java 7. The latter instances can also be expressed as unloaded JavaInstance representations.
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue.OfConstant<U extends Annotation>TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends Annotation>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S extends Annotation>DEFAULTS| Modifier | Constructor and Description |
|---|---|
protected |
OfConstant(Class<U> type,
Object value)
Creates a binder for binding a fixed value to a parameter annotated with the given annotation.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
bind(AnnotationDescription.Loadable<U> annotation,
MethodDescription source,
ParameterDescription target)
Resolves a value for the given annotation on a parameter that is processed by a
MethodDelegation. |
boolean |
equals(Object object) |
Class<U> |
getHandledType()
The annotation type that is handled by this parameter binder.
|
int |
hashCode() |
static <V extends Annotation> |
of(Class<V> type,
Object value)
Creates a binder for binding a fixed value to a given annotation.
|
String |
toString() |
bindpublic static <V extends Annotation> TargetMethodAnnotationDrivenBinder.ParameterBinder<V> of(Class<V> type, Object value)
V - The bound annotation's type.type - The type of the annotation that is bound by this binder.value - The value that is assigned to any annotated parameter.public Class<U> getHandledType()
TargetMethodAnnotationDrivenBinder.ParameterBinderAnnotation.annotationType() handled by this parameter binder.protected Object bind(AnnotationDescription.Loadable<U> annotation, MethodDescription source, ParameterDescription target)
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValueMethodDelegation.bind in class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<U extends Annotation>annotation - The annotation that triggered this binding.source - The method for which a delegation is currently bound.target - The parameter for which a value is bound.null for binding this value.Copyright © 2014–2016. All rights reserved.