public enum ArgumentTypeResolver extends Enum<ArgumentTypeResolver> implements MethodDelegationBinder.AmbiguityResolver
MethodDelegationBinder.AmbiguityResolverthat resolves two conflicting bindings by considering most-specific types of target method parameters in the same manner as the Java compiler resolves bindings of overloaded method.
This ambiguity resolver:
For example: If a source method only parameter was successfully bound one-to-one to the only parameters of the target methods
bar(String), this ambiguity resolver will detect that the
Stringtype is more specific than the
Objecttype and determine
bar(String)as the dominant binding.
|Modifier and Type||Class and Description|
This token is used to mark a one-to-one binding of a source method parameter to a target method parameter.
A representation of the precedence of a most specific primitive type in the Java programming language.
MethodDelegationBinder.AmbiguityResolver.Compound, MethodDelegationBinder.AmbiguityResolver.Directional, MethodDelegationBinder.AmbiguityResolver.NoOp, MethodDelegationBinder.AmbiguityResolver.Resolution
|Enum Constant and Description|
The singleton instance.
|Modifier and Type||Method and Description|
Attempts to resolve to conflicting bindings.
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final ArgumentTypeResolver INSTANCE
public static ArgumentTypeResolver values()
for (ArgumentTypeResolver c : ArgumentTypeResolver.values()) System.out.println(c);
public static ArgumentTypeResolver valueOf(String name)
public MethodDelegationBinder.AmbiguityResolver.Resolution resolve(MethodDescription source, MethodDelegationBinder.MethodBinding left, MethodDelegationBinder.MethodBinding right)
source- The source method that was bound to both target methods.
left- The first successful binding of the
right- The second successful binding of the
MethodDelegationBinder.AmbiguityResolver.Resolution.LEFTindicates a successful binding to the
MethodDelegationBinder.AmbiguityResolver.Resolution.RIGHTindicates a successful binding to the
Copyright © 2014–2019. All rights reserved.