Enum ArgumentTypeResolver.PrimitiveTypePrecedence
- java.lang.Object
-
- java.lang.Enum<ArgumentTypeResolver.PrimitiveTypePrecedence>
-
- net.bytebuddy.implementation.bind.ArgumentTypeResolver.PrimitiveTypePrecedence
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ArgumentTypeResolver.PrimitiveTypePrecedence>
- Enclosing class:
- ArgumentTypeResolver
protected static enum ArgumentTypeResolver.PrimitiveTypePrecedence extends java.lang.Enum<ArgumentTypeResolver.PrimitiveTypePrecedence>
A representation of the precedence of a most specific primitive type in the Java programming language.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANThe precedence of thebooleantype.BYTEThe precedence of thebytetype.CHARACTERThe precedence of thechartype.DOUBLEThe precedence of thedoubletype.FLOATThe precedence of thefloattype.INTEGERThe precedence of theinttype.LONGThe precedence of thelongtype.SHORTThe precedence of theshorttype.
-
Field Summary
Fields Modifier and Type Field Description private intscoreA score representing the precedence where a higher score represents a less specific type.
-
Constructor Summary
Constructors Modifier Constructor Description privatePrimitiveTypePrecedence(int score)Creates a new primitive type precedence.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArgumentTypeResolver.PrimitiveTypePrecedenceforPrimitive(TypeDescription typeDescription)Locates the primitive type precedence for a given type.MethodDelegationBinder.AmbiguityResolver.Resolutionresolve(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.static ArgumentTypeResolver.PrimitiveTypePrecedencevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ArgumentTypeResolver.PrimitiveTypePrecedence[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final ArgumentTypeResolver.PrimitiveTypePrecedence BOOLEAN
The precedence of thebooleantype.
-
BYTE
public static final ArgumentTypeResolver.PrimitiveTypePrecedence BYTE
The precedence of thebytetype.
-
SHORT
public static final ArgumentTypeResolver.PrimitiveTypePrecedence SHORT
The precedence of theshorttype.
-
INTEGER
public static final ArgumentTypeResolver.PrimitiveTypePrecedence INTEGER
The precedence of theinttype.
-
CHARACTER
public static final ArgumentTypeResolver.PrimitiveTypePrecedence CHARACTER
The precedence of thechartype.
-
LONG
public static final ArgumentTypeResolver.PrimitiveTypePrecedence LONG
The precedence of thelongtype.
-
FLOAT
public static final ArgumentTypeResolver.PrimitiveTypePrecedence FLOAT
The precedence of thefloattype.
-
DOUBLE
public static final ArgumentTypeResolver.PrimitiveTypePrecedence DOUBLE
The precedence of thedoubletype.
-
-
Method Detail
-
values
public static ArgumentTypeResolver.PrimitiveTypePrecedence[] 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 (ArgumentTypeResolver.PrimitiveTypePrecedence c : ArgumentTypeResolver.PrimitiveTypePrecedence.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ArgumentTypeResolver.PrimitiveTypePrecedence 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
-
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
-
-