Enum Class MethodDelegationBinder.BindingResolver.Unique
java.lang.Object
java.lang.Enum<MethodDelegationBinder.BindingResolver.Unique>
net.bytebuddy.implementation.bind.MethodDelegationBinder.BindingResolver.Unique
- All Implemented Interfaces:
Serializable
,Comparable<MethodDelegationBinder.BindingResolver.Unique>
,Constable
,MethodDelegationBinder.BindingResolver
- Enclosing interface:
- MethodDelegationBinder.BindingResolver
public static enum MethodDelegationBinder.BindingResolver.Unique
extends Enum<MethodDelegationBinder.BindingResolver.Unique>
implements MethodDelegationBinder.BindingResolver
A binding resolver that only binds a method if it has a unique binding.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.MethodDelegationBinder.BindingResolver
MethodDelegationBinder.BindingResolver.Default, MethodDelegationBinder.BindingResolver.StreamWriting, MethodDelegationBinder.BindingResolver.Unique
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
Indicates the first index of a list only containing one element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve
(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, List<MethodDelegationBinder.MethodBinding> targets) Resolves a method binding for thesource
method.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Field Details
-
ONLY
private static final int ONLYIndicates the first index of a list only containing one element.- See Also:
-
-
Constructor Details
-
Unique
private Unique()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
resolve
public MethodDelegationBinder.MethodBinding resolve(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, List<MethodDelegationBinder.MethodBinding> targets) Resolves a method binding for thesource
method.- Specified by:
resolve
in interfaceMethodDelegationBinder.BindingResolver
- Parameters:
ambiguityResolver
- The ambiguity resolver to use.source
- The source method being bound.targets
- The possible target candidates. The list contains at least one element.- Returns:
- The method binding that was chosen.
-