java.lang.invoke.MethodHandle which invokes a
default method implementation of this method. If such a method is not available, this annotation causes that this
delegation target cannot be bound unless DefaultMethodHandle#nullIfImpossible() is set to true.
Note that requesting such a method exposes the default method to reflective access.
net.bytebuddy.implementation.MethodDelegation , TargetMethodAnnotationDrivenBinder
| Modifier and Type | Class and Description |
|---|---|
| public static enum | DefaultMethodHandle.Binder
A binder for the |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if null should be assigned if no valid method can be assigned.Indicates that |
| public Class | Returns: The type declaring the method to invoke orTargetType to indicate that the instrumented method declared the method.Specifies an explicit type that declares the default method to invoke. |
| nullIfImpossible | back to summary |
|---|---|
| public boolean nullIfImpossible() Indicates that
| |
| targetType | back to summary |
|---|---|
| public Class Specifies an explicit type that declares the default method to invoke.
| |
DefaultMethodHandle annotation.
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | DefaultMethodHandle.Binder.MethodLocator
A method locator is responsible for creating the super method call. |
| Modifier and Type | Field and Description |
|---|---|
| public static final DefaultMethodHandle. | INSTANCE
The singleton instance. |
| private static final MethodDescription. | NULL_IF_IMPOSSIBLE
The |
| private static final MethodDescription. | TARGET_TYPE
The |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public MethodDelegationBinder. | bind(final 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 DefaultMethodHandle. | |
| public static DefaultMethodHandle. |
| INSTANCE | back to summary |
|---|---|
| public static final DefaultMethodHandle. The singleton instance. | |
| NULL_IF_IMPOSSIBLE | back to summary |
|---|---|
| private static final MethodDescription. The | |
| TARGET_TYPE | back to summary |
|---|---|
| private static final MethodDescription. The | |
| 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 DefaultMethodHandle. | |
| values | back to summary |
|---|---|
| public static DefaultMethodHandle. | |
| Modifier and Type | Class and Description |
|---|---|
| public static class | DefaultMethodHandle.Binder.MethodLocator.ForExplicitType
A method locator for an explicit target type. |
| public static enum | DefaultMethodHandle.Binder.MethodLocator.ForImplicitType
A method locator for an implicit target type. |
| Modifier and Type | Method and Description |
|---|---|
| public Implementation. | Returns: A special method invocation that represents the super call of this binding.The implementation target. implementationTarget,The method being instrumented. source)Resolves the special method invocation to this target. |
| resolve | back to summary |
|---|---|
| public Implementation. Resolves the special method invocation to this target.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final TypeDescription | typeDescription
The explicit target type. |
| Access | Constructor and Description |
|---|---|
| protected | ForExplicitType(TypeDescription
The explicit target type. typeDescription)Creates a method locator for an explicit target. |
| Modifier and Type | Method and Description |
|---|---|
| public Implementation. | resolve(Implementation.
The implementation target. implementationTarget,The method being instrumented. source)Implements net. |
| typeDescription | back to summary |
|---|---|
| private final TypeDescription typeDescription The explicit target type. | |
| ForExplicitType | back to summary |
|---|---|
| protected ForExplicitType(TypeDescription typeDescription) Creates a method locator for an explicit target.
| |
| resolve | back to summary |
|---|---|
| public Implementation. Implements net. Doc from net. Resolves the special method invocation to this target.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final DefaultMethodHandle. | INSTANCE
The singleton instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Implementation. | resolve(Implementation.
The implementation target. implementationTarget,The method being instrumented. source)Implements net. |
| public static DefaultMethodHandle. | |
| public static DefaultMethodHandle. |
| INSTANCE | back to summary |
|---|---|
| public static final DefaultMethodHandle. The singleton instance. | |
| ForImplicitType | back to summary |
|---|---|
| private ForImplicitType() | |
| resolve | back to summary |
|---|---|
| public Implementation. Implements net. Doc from net. Resolves the special method invocation to this target.
| |
| valueOf | back to summary |
|---|---|
| public static DefaultMethodHandle. | |
| values | back to summary |
|---|---|
| public static DefaultMethodHandle. | |