Class DefaultCall.Binder.DefaultMethodLocator.Explicit
java.lang.Object
net.bytebuddy.implementation.bind.annotation.DefaultCall.Binder.DefaultMethodLocator.Explicit
- All Implemented Interfaces:
DefaultCall.Binder.DefaultMethodLocator
- Enclosing interface:
DefaultCall.Binder.DefaultMethodLocator
@Enhance
public static class DefaultCall.Binder.DefaultMethodLocator.Explicit
extends Object
implements DefaultCall.Binder.DefaultMethodLocator
An explicit default method locator attempts to look up a default method in the specified interface type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.DefaultCall.Binder.DefaultMethodLocator
DefaultCall.Binder.DefaultMethodLocator.Explicit, DefaultCall.Binder.DefaultMethodLocator.Implicit -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescriptionA description of the type on which the default method should be invoked. -
Constructor Summary
ConstructorsConstructorDescriptionExplicit(TypeDescription typeDescription) Creates a new explicit default method locator. -
Method Summary
Modifier and TypeMethodDescriptionresolve(Implementation.Target implementationTarget, MethodDescription source) Locates the correct default method to a given source method.
-
Field Details
-
typeDescription
A description of the type on which the default method should be invoked.
-
-
Constructor Details
-
Explicit
Creates a new explicit default method locator.- Parameters:
typeDescription- The actual target interface as explicitly defined byDefaultCall.targetType().
-
-
Method Details
-
resolve
public Implementation.SpecialMethodInvocation resolve(Implementation.Target implementationTarget, MethodDescription source) Locates the correct default method to a given source method.- Specified by:
resolvein interfaceDefaultCall.Binder.DefaultMethodLocator- Parameters:
implementationTarget- The current implementation target.source- The source method for which a default method should be looked up.- Returns:
- A special method invocation of the default method or an illegal special method invocation, if no suitable invocation could be located.
-