Interface MethodDelegationBinder.AmbiguityResolver
- All Known Implementing Classes:
ArgumentTypeResolver
,BindingPriority.Resolver
,DeclaringTypeResolver
,MethodDelegationBinder.AmbiguityResolver.Compound
,MethodDelegationBinder.AmbiguityResolver.Directional
,MethodDelegationBinder.AmbiguityResolver.NoOp
,MethodNameEqualityResolver
,ParameterLengthResolver
- Enclosing interface:
MethodDelegationBinder
public static interface MethodDelegationBinder.AmbiguityResolver
Implementations of this interface are able to attempt the resolution of two successful bindings of a method
to two different target methods in order to identify a dominating binding.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A chain ofMethodDelegationBinder.AmbiguityResolver
s that are applied in the given order until two bindings can be resolved.static enum
An ambiguity resolver that always resolves in the specified direction.static enum
An ambiguity resolver that does not attempt to resolve a conflicting binding.static enum
A resolution state of an attempt to resolve two conflicting bindings. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MethodDelegationBinder.AmbiguityResolver
The default ambiguity resolver to use. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(MethodDescription source, MethodDelegationBinder.MethodBinding left, MethodDelegationBinder.MethodBinding right) Attempts to resolve to conflicting bindings.
-
Field Details
-
DEFAULT
The default ambiguity resolver to use.
-
-
Method Details
-
resolve
MethodDelegationBinder.AmbiguityResolver.Resolution resolve(MethodDescription source, MethodDelegationBinder.MethodBinding left, MethodDelegationBinder.MethodBinding right) Attempts to resolve to conflicting bindings.- Parameters:
source
- The source method that was bound to both target methods.left
- The first successful binding of thesource
method.right
- The second successful binding of thesource
method.- Returns:
- The resolution state when resolving a conflicting binding where
MethodDelegationBinder.AmbiguityResolver.Resolution.LEFT
indicates a successful binding to theleft
binding whileMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHT
indicates a successful binding to theright
binding.
-