Enum MethodDelegationBinder.BindingResolver.Default
- java.lang.Object
-
- java.lang.Enum<MethodDelegationBinder.BindingResolver.Default>
-
- net.bytebuddy.implementation.bind.MethodDelegationBinder.BindingResolver.Default
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodDelegationBinder.BindingResolver.Default>
,MethodDelegationBinder.BindingResolver
- Enclosing interface:
- MethodDelegationBinder.BindingResolver
public static enum MethodDelegationBinder.BindingResolver.Default extends java.lang.Enum<MethodDelegationBinder.BindingResolver.Default> implements MethodDelegationBinder.BindingResolver
A default implementation of a binding resolver that fully relies on anMethodDelegationBinder.AmbiguityResolver
.
-
-
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
LEFT
Represents the index of the left value of two elements in a list.private static int
ONLY
Represents the index of the only value of two elements in a list.private static int
RIGHT
Represents the index of the right value of two elements in a list.
-
Constructor Summary
Constructors Modifier Constructor Description private
Default()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private MethodDelegationBinder.MethodBinding
doResolve(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, java.util.List<MethodDelegationBinder.MethodBinding> targets)
Resolves a method binding for thesource
method.MethodDelegationBinder.MethodBinding
resolve(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, java.util.List<MethodDelegationBinder.MethodBinding> targets)
Resolves a method binding for thesource
method.static MethodDelegationBinder.BindingResolver.Default
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodDelegationBinder.BindingResolver.Default[]
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.Default INSTANCE
The singleton instance.
-
-
Field Detail
-
ONLY
private static final int ONLY
Represents the index of the only value of two elements in a list.- See Also:
- Constant Field Values
-
LEFT
private static final int LEFT
Represents the index of the left value of two elements in a list.- See Also:
- Constant Field Values
-
RIGHT
private static final int RIGHT
Represents the index of the right value of two elements in a list.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static MethodDelegationBinder.BindingResolver.Default[] 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.Default c : MethodDelegationBinder.BindingResolver.Default.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.Default 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.
-
doResolve
private MethodDelegationBinder.MethodBinding doResolve(MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDescription source, java.util.List<MethodDelegationBinder.MethodBinding> targets)
Resolves a method binding for thesource
method.- 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 and is mutable.- Returns:
- The method binding that was chosen.
-
-