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 BOOLEANAn unboxing responsible for unboxing aBooleantype.BYTEAn unboxing responsible for unboxing aBytetype.CHARACTERAn unboxing responsible for unboxing aCharactertype.DOUBLEAn unboxing responsible for unboxing aDoubletype.FLOATAn unboxing responsible for unboxing aFloattype.INTEGERAn unboxing responsible for unboxing aIntegertype.LONGAn unboxing responsible for unboxing aLongtype.SHORTAn unboxing responsible for unboxing aShorttype.
-
Field Summary
Fields Modifier and Type Field Description private PrimitiveUnboxingDelegateprimitiveUnboxingDelegateThe primitive unboxing delegate for handling the given wrapper type.
-
Constructor Summary
Constructors Modifier Constructor Description privateExplicitlyTypedUnboxingResponsible(PrimitiveUnboxingDelegate primitiveUnboxingDelegate)Creates a new explicitly typed unboxing responsible.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulationassignUnboxedTo(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.ExplicitlyTypedUnboxingResponsiblevalueOf(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 aBooleantype.
-
BYTE
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible BYTE
An unboxing responsible for unboxing aBytetype.
-
SHORT
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible SHORT
An unboxing responsible for unboxing aShorttype.
-
CHARACTER
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible CHARACTER
An unboxing responsible for unboxing aCharactertype.
-
INTEGER
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible INTEGER
An unboxing responsible for unboxing aIntegertype.
-
LONG
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible LONG
An unboxing responsible for unboxing aLongtype.
-
FLOAT
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible FLOAT
An unboxing responsible for unboxing aFloattype.
-
DOUBLE
public static final PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible DOUBLE
An unboxing responsible for unboxing aDoubletype.
-
-
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:
assignUnboxedToin 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.
-
-