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 thebooleantype.The precedence of thebytetype.The precedence of thechartype.The precedence of thedoubletype.The precedence of thefloattype.The precedence of theinttype.The precedence of thelongtype.The precedence of theshorttype. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intA score representing the precedence where a higher score represents a less specific type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrimitiveTypePrecedence(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.LEFTresolution and the argument type representing theMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHTresolution.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 thebooleantype. -
BYTE
The precedence of thebytetype. -
SHORT
The precedence of theshorttype. -
INTEGER
The precedence of theinttype. -
CHARACTER
The precedence of thechartype. -
LONG
The precedence of thelongtype. -
FLOAT
The precedence of thefloattype. -
DOUBLE
The precedence of thedoubletype.
-
-
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.LEFTresolution and the argument type representing theMethodDelegationBinder.AmbiguityResolver.Resolution.RIGHTresolution.- Parameters:
right- Another primitive type precedence against which this precedence should be resolved.- Returns:
- The resolution of
-