Enum PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible
- java.lang.Object
-
- java.lang.Enum<PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible>
-
- net.bytebuddy.implementation.bytecode.assign.primitive.PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible>
,PrimitiveUnboxingDelegate.UnboxingResponsible
- Enclosing class:
- PrimitiveUnboxingDelegate
protected static enum PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible extends java.lang.Enum<PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible> implements PrimitiveUnboxingDelegate.UnboxingResponsible
An explicitly types unboxing responsible is applied for directly unboxing a wrapper type.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEAN
An unboxing responsible for unboxing aBoolean
type.BYTE
An unboxing responsible for unboxing aByte
type.CHARACTER
An unboxing responsible for unboxing aCharacter
type.DOUBLE
An unboxing responsible for unboxing aDouble
type.FLOAT
An unboxing responsible for unboxing aFloat
type.INTEGER
An unboxing responsible for unboxing aInteger
type.LONG
An unboxing responsible for unboxing aLong
type.SHORT
An unboxing responsible for unboxing aShort
type.
-
Field Summary
Fields Modifier and Type Field Description private PrimitiveUnboxingDelegate
primitiveUnboxingDelegate
The primitive unboxing delegate for handling the given wrapper type.
-
Constructor Summary
Constructors Modifier Constructor Description private
ExplicitlyTypedUnboxingResponsible(PrimitiveUnboxingDelegate primitiveUnboxingDelegate)
Creates a new explicitly typed unboxing responsible.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
assignUnboxedTo(TypeDescription.Generic targetType, Assigner assigner, Assigner.Typing typing)
Attempts to unbox the represented type in order to assign the unboxed value to the given target type while using the assigner that is provided by the method call.static PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible BOOLEAN
An unboxing responsible for unboxing aBoolean
type.
-
BYTE
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible BYTE
An unboxing responsible for unboxing aByte
type.
-
SHORT
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible SHORT
An unboxing responsible for unboxing aShort
type.
-
CHARACTER
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible CHARACTER
An unboxing responsible for unboxing aCharacter
type.
-
INTEGER
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible INTEGER
An unboxing responsible for unboxing aInteger
type.
-
LONG
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible LONG
An unboxing responsible for unboxing aLong
type.
-
FLOAT
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible FLOAT
An unboxing responsible for unboxing aFloat
type.
-
DOUBLE
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible DOUBLE
An unboxing responsible for unboxing aDouble
type.
-
-
Field Detail
-
primitiveUnboxingDelegate
private final PrimitiveUnboxingDelegate primitiveUnboxingDelegate
The primitive unboxing delegate for handling the given wrapper type.
-
-
Constructor Detail
-
ExplicitlyTypedUnboxingResponsible
private ExplicitlyTypedUnboxingResponsible(PrimitiveUnboxingDelegate primitiveUnboxingDelegate)
Creates a new explicitly typed unboxing responsible.- Parameters:
primitiveUnboxingDelegate
- The primitive unboxing delegate for handling the given wrapper type.
-
-
Method Detail
-
values
public static PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible[] 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 (PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible c : PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible 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
-
assignUnboxedTo
public StackManipulation assignUnboxedTo(TypeDescription.Generic targetType, Assigner assigner, Assigner.Typing typing)
Attempts to unbox the represented type in order to assign the unboxed value to the given target type while using the assigner that is provided by the method call.- Specified by:
assignUnboxedTo
in interfacePrimitiveUnboxingDelegate.UnboxingResponsible
- Parameters:
targetType
- The type that is the desired outcome of the assignment.assigner
- The assigner used to assign the unboxed type to the target type.typing
- Determines if a type-casting should be attempted for incompatible types.- Returns:
- A stack manipulation representing this assignment if such an assignment is possible. An illegal assignment otherwise.
-
-