Enum Class ArgumentTypeResolver.PrimitiveTypePrecedence
java.lang.Object
java.lang.Enum<ArgumentTypeResolver.PrimitiveTypePrecedence>
net.bytebuddy.implementation.bind.ArgumentTypeResolver.PrimitiveTypePrecedence
- All Implemented Interfaces:
Serializable
,Comparable<ArgumentTypeResolver.PrimitiveTypePrecedence>
,Constable
- Enclosing class:
ArgumentTypeResolver
protected static enum ArgumentTypeResolver.PrimitiveTypePrecedence
extends Enum<ArgumentTypeResolver.PrimitiveTypePrecedence>
A representation of the precedence of a most specific primitive type in the Java programming language.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe precedence of theboolean
type.The precedence of thebyte
type.The precedence of thechar
type.The precedence of thedouble
type.The precedence of thefloat
type.The precedence of theint
type.The precedence of thelong
type.The precedence of theshort
type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
A score representing the precedence where a higher score represents a less specific type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PrimitiveTypePrecedence
(int score) Creates a new primitive type precedence. -
Method Summary
Modifier and TypeMethodDescriptionforPrimitive
(TypeDescription typeDescription) Locates the primitive type precedence for a given type.Resolves the least specific type of two primitive type precedence with this instance representing aMethodDelegationBinder.AmbiguityResolver.Resolution.LEFT
resolution and the argument type representing theMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHT
resolution.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
-
BOOLEAN
The precedence of theboolean
type. -
BYTE
The precedence of thebyte
type. -
SHORT
The precedence of theshort
type. -
INTEGER
The precedence of theint
type. -
CHARACTER
The precedence of thechar
type. -
LONG
The precedence of thelong
type. -
FLOAT
The precedence of thefloat
type. -
DOUBLE
The precedence of thedouble
type.
-
-
Field Details
-
score
private final int scoreA score representing the precedence where a higher score represents a less specific type.
-
-
Constructor Details
-
PrimitiveTypePrecedence
private PrimitiveTypePrecedence(int score) Creates a new primitive type precedence.- Parameters:
score
- A score representing the precedence where a higher score represents a less specific type.
-
-
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
-
forPrimitive
public static ArgumentTypeResolver.PrimitiveTypePrecedence forPrimitive(TypeDescription typeDescription) Locates the primitive type precedence for a given type.- Parameters:
typeDescription
- The non-void, primitive type for which the precedence should be located.- Returns:
- The corresponding primitive type precedence.
-
resolve
public MethodDelegationBinder.AmbiguityResolver.Resolution resolve(ArgumentTypeResolver.PrimitiveTypePrecedence right) Resolves the least specific type of two primitive type precedence with this instance representing aMethodDelegationBinder.AmbiguityResolver.Resolution.LEFT
resolution and the argument type representing theMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHT
resolution.- Parameters:
right
- Another primitive type precedence against which this precedence should be resolved.- Returns:
- The resolution of
-