Enum MethodDelegationBinder.AmbiguityResolver.Directional
- java.lang.Object
-
- java.lang.Enum<MethodDelegationBinder.AmbiguityResolver.Directional>
-
- net.bytebuddy.implementation.bind.MethodDelegationBinder.AmbiguityResolver.Directional
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodDelegationBinder.AmbiguityResolver.Directional>
,MethodDelegationBinder.AmbiguityResolver
- Enclosing interface:
- MethodDelegationBinder.AmbiguityResolver
public static enum MethodDelegationBinder.AmbiguityResolver.Directional extends java.lang.Enum<MethodDelegationBinder.AmbiguityResolver.Directional> implements MethodDelegationBinder.AmbiguityResolver
An ambiguity resolver that always resolves in the specified direction.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.MethodDelegationBinder.AmbiguityResolver
MethodDelegationBinder.AmbiguityResolver.Compound, MethodDelegationBinder.AmbiguityResolver.Directional, MethodDelegationBinder.AmbiguityResolver.NoOp, MethodDelegationBinder.AmbiguityResolver.Resolution
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LEFT
A resolver that always resolves toMethodDelegationBinder.AmbiguityResolver.Resolution.LEFT
.RIGHT
A resolver that always resolves toMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHT
.
-
Field Summary
Fields Modifier and Type Field Description private boolean
left
true
if this instance should resolve to the left side.-
Fields inherited from interface net.bytebuddy.implementation.bind.MethodDelegationBinder.AmbiguityResolver
DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Directional(boolean left)
Creates a new directional resolver.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegationBinder.AmbiguityResolver.Resolution
resolve(MethodDescription source, MethodDelegationBinder.MethodBinding left, MethodDelegationBinder.MethodBinding right)
Attempts to resolve to conflicting bindings.static MethodDelegationBinder.AmbiguityResolver.Directional
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodDelegationBinder.AmbiguityResolver.Directional[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LEFT
public static final MethodDelegationBinder.AmbiguityResolver.Directional LEFT
A resolver that always resolves toMethodDelegationBinder.AmbiguityResolver.Resolution.LEFT
.
-
RIGHT
public static final MethodDelegationBinder.AmbiguityResolver.Directional RIGHT
A resolver that always resolves toMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHT
.
-
-
Method Detail
-
values
public static MethodDelegationBinder.AmbiguityResolver.Directional[] 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.AmbiguityResolver.Directional c : MethodDelegationBinder.AmbiguityResolver.Directional.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.AmbiguityResolver.Directional 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.AmbiguityResolver.Resolution resolve(MethodDescription source, MethodDelegationBinder.MethodBinding left, MethodDelegationBinder.MethodBinding right)
Attempts to resolve to conflicting bindings.- Specified by:
resolve
in interfaceMethodDelegationBinder.AmbiguityResolver
- 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.
-
-