Enum PrimitiveBoxingDelegate
- java.lang.Object
-
- java.lang.Enum<PrimitiveBoxingDelegate>
-
- net.bytebuddy.implementation.bytecode.assign.primitive.PrimitiveBoxingDelegate
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PrimitiveBoxingDelegate>
public enum PrimitiveBoxingDelegate extends java.lang.Enum<PrimitiveBoxingDelegate>
This delegate is responsible for boxing a primitive types to their wrapper equivalents.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEAN
The boxing delegate forboolean
values.BYTE
The boxing delegate forbyte
values.CHARACTER
The boxing delegate forchar
values.DOUBLE
The boxing delegate fordouble
values.FLOAT
The boxing delegate forfloat
values.INTEGER
The boxing delegate forint
values.LONG
The boxing delegate forlong
values.SHORT
The boxing delegate forshort
values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
assignBoxedTo(TypeDescription.Generic target, Assigner chainedAssigner, Assigner.Typing typing)
Creates a stack manipulation that boxes the represented primitive type and applies a chained assignment to the result of this boxing operation.static PrimitiveBoxingDelegate
forPrimitive(TypeDefinition typeDefinition)
Locates a boxing delegate for a given primitive type.static PrimitiveBoxingDelegate
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PrimitiveBoxingDelegate[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final PrimitiveBoxingDelegate BOOLEAN
The boxing delegate forboolean
values.
-
BYTE
public static final PrimitiveBoxingDelegate BYTE
The boxing delegate forbyte
values.
-
SHORT
public static final PrimitiveBoxingDelegate SHORT
The boxing delegate forshort
values.
-
CHARACTER
public static final PrimitiveBoxingDelegate CHARACTER
The boxing delegate forchar
values.
-
INTEGER
public static final PrimitiveBoxingDelegate INTEGER
The boxing delegate forint
values.
-
LONG
public static final PrimitiveBoxingDelegate LONG
The boxing delegate forlong
values.
-
FLOAT
public static final PrimitiveBoxingDelegate FLOAT
The boxing delegate forfloat
values.
-
DOUBLE
public static final PrimitiveBoxingDelegate DOUBLE
The boxing delegate fordouble
values.
-
-
Method Detail
-
values
public static PrimitiveBoxingDelegate[] 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 (PrimitiveBoxingDelegate c : PrimitiveBoxingDelegate.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PrimitiveBoxingDelegate 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 PrimitiveBoxingDelegate forPrimitive(TypeDefinition typeDefinition)
Locates a boxing delegate for a given primitive type.- Parameters:
typeDefinition
- A non-void primitive type.- Returns:
- A delegate capable of boxing the given primitive type.
-
assignBoxedTo
public StackManipulation assignBoxedTo(TypeDescription.Generic target, Assigner chainedAssigner, Assigner.Typing typing)
Creates a stack manipulation that boxes the represented primitive type and applies a chained assignment to the result of this boxing operation.- Parameters:
target
- The type that is target of the assignment operation.chainedAssigner
- The assigner that is to be used to perform the chained assignment.typing
- Determines if an assignment to an incompatible type should be enforced by a casting.- Returns:
- A stack manipulation that represents the described assignment operation.
-
-