A stub value represents the (boxed) default value of the intercepted method's return type. This value can
only be assigned to a java. parameter. This annotation is useful to conditionally return a
default value from a method when using an java. return type in combination with the
net. annotation. The value is either representing
null if a method returns a reference type or void or a boxed primitive of the return type
representing the numeric value 0.
Important Note
Don't confuse this annotation with net. or
net.. This annotation should be used with
net. only.
net.bytebuddy.implementation.MethodDelegation , net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder
| Modifier and Type | Class and Description |
|---|---|
| public static enum | StubValue.Binder
Binds the |
net.bytebuddy.implementation.bind.annotation.StubValue annotation.
| Modifier and Type | Field and Description |
|---|---|
| public static final StubValue. | INSTANCE
The singleton instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public MethodDelegationBinder. | bind(AnnotationDescription.
The annotation that was cause for the delegation to this argument binder. annotation,The intercepted source method. source, ParameterDescription Tge target parameter that is subject to be bound to
intercepting the target, Implementation.source method.The target of the current implementation that is subject to this binding. implementationTarget,An assigner that can be used for applying the binding. assigner, Assigner.The typing to apply. typingImplements net. |
| public Class | getHandledType()
The annotation type that is handled by this parameter binder.
|
| public static StubValue. | |
| public static StubValue. |
| INSTANCE | back to summary |
|---|---|
| public static final StubValue. The singleton instance. | |
| Binder | back to summary |
|---|---|
| private Binder() | |
| bind | back to summary |
|---|---|
| public MethodDelegationBinder. Implements net. Doc from net. Creates a parameter binding for the given target parameter.
| |
| getHandledType | back to summary |
|---|---|
| public Class The annotation type that is handled by this parameter binder.
| |
| valueOf | back to summary |
|---|---|
| public static StubValue. | |
| values | back to summary |
|---|---|
| public static StubValue. | |