Enum BindingPriority.Resolver
- java.lang.Object
-
- java.lang.Enum<BindingPriority.Resolver>
-
- net.bytebuddy.implementation.bind.annotation.BindingPriority.Resolver
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BindingPriority.Resolver>
,MethodDelegationBinder.AmbiguityResolver
- Enclosing class:
- BindingPriority
public static enum BindingPriority.Resolver extends java.lang.Enum<BindingPriority.Resolver> implements MethodDelegationBinder.AmbiguityResolver
An ambiguity resolver that considers the priority of a method as defined by theBindingPriority
annotation.
-
-
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 INSTANCE
The singleton instance.
-
Field Summary
-
Fields inherited from interface net.bytebuddy.implementation.bind.MethodDelegationBinder.AmbiguityResolver
DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Resolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
resolve(AnnotationDescription.Loadable<BindingPriority> bindingPriority)
Resolves the explicitly stated binding priority of a method or returns the default value if no such explicit information can be found.MethodDelegationBinder.AmbiguityResolver.Resolution
resolve(MethodDescription source, MethodDelegationBinder.MethodBinding left, MethodDelegationBinder.MethodBinding right)
Attempts to resolve to conflicting bindings.static BindingPriority.Resolver
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BindingPriority.Resolver[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final BindingPriority.Resolver INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static BindingPriority.Resolver[] 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 (BindingPriority.Resolver c : BindingPriority.Resolver.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BindingPriority.Resolver 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
private static int resolve(AnnotationDescription.Loadable<BindingPriority> bindingPriority)
Resolves the explicitly stated binding priority of a method or returns the default value if no such explicit information can be found.- Parameters:
bindingPriority
- The annotation of the method ornull
if no such annotation was found.- Returns:
- The factual priority of the method under investigation.
-
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.
-
-