Enum MethodDelegationBinder.BindingResolver.Unique
- java.lang.Object
-
- java.lang.Enum<MethodDelegationBinder.BindingResolver.Unique>
-
- net.bytebuddy.implementation.bind.MethodDelegationBinder.BindingResolver.Unique
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodDelegationBinder.BindingResolver.Unique>
,MethodDelegationBinder.BindingResolver
- Enclosing interface:
- MethodDelegationBinder.BindingResolver
public static enum MethodDelegationBinder.BindingResolver.Unique extends java.lang.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 interface net.bytebuddy.implementation.bind.MethodDelegationBinder.BindingResolver
MethodDelegationBinder.BindingResolver.Default, MethodDelegationBinder.BindingResolver.StreamWriting, MethodDelegationBinder.BindingResolver.Unique
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
Fields Modifier and Type Field Description private static int
ONLY
Indicates the first index of a list only containing one element.
-
Constructor Summary
Constructors Modifier Constructor Description private
Unique()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegationBinder.MethodBinding
resolve(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, java.util.List<MethodDelegationBinder.MethodBinding> targets)
Resolves a method binding for thesource
method.static MethodDelegationBinder.BindingResolver.Unique
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodDelegationBinder.BindingResolver.Unique[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodDelegationBinder.BindingResolver.Unique INSTANCE
The singleton instance.
-
-
Field Detail
-
ONLY
private static final int ONLY
Indicates the first index of a list only containing one element.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static MethodDelegationBinder.BindingResolver.Unique[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MethodDelegationBinder.BindingResolver.Unique c : MethodDelegationBinder.BindingResolver.Unique.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MethodDelegationBinder.BindingResolver.Unique valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
resolve
public MethodDelegationBinder.MethodBinding resolve(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, java.util.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.
-
-