public enum PrimitiveUnboxingDelegate extends Enum<PrimitiveUnboxingDelegate> implements StackManipulation
Modifier and Type | Class and Description |
---|---|
protected static class |
PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible
An explicitly types unboxing responsible is applied for directly unboxing a wrapper type.
|
protected static class |
PrimitiveUnboxingDelegate.ImplicitlyTypedUnboxingResponsible
An unboxing responsible for an implicitly typed value.
|
static interface |
PrimitiveUnboxingDelegate.UnboxingResponsible
Implementations represent an unboxing delegate that is able to perform the unboxing operation.
|
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
Enum Constant and Description |
---|
BOOLEAN
The unboxing delegate for
Boolean types. |
BYTE
The unboxing delegate for
Byte types. |
CHARACTER
The unboxing delegate for
Character types. |
DOUBLE
The unboxing delegate for
Double types. |
FLOAT
The unboxing delegate for
Float types. |
INTEGER
The unboxing delegate for
Integer types. |
LONG
The unboxing delegate for
Long types. |
SHORT
The unboxing delegate for
Short types. |
Modifier and Type | Method and Description |
---|---|
StackManipulation.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
static PrimitiveUnboxingDelegate |
forPrimitive(TypeDefinition typeDefinition)
Locates a primitive unboxing delegate for a given primitive type.
|
static PrimitiveUnboxingDelegate.UnboxingResponsible |
forReferenceType(TypeDefinition typeDefinition)
Creates an unboxing responsible that is capable of unboxing a wrapper type.
|
protected TypeDescription.Generic |
getWrapperType()
Returns the wrapper type that this unboxing delegate represents.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
static PrimitiveUnboxingDelegate |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PrimitiveUnboxingDelegate[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PrimitiveUnboxingDelegate BOOLEAN
Boolean
types.public static final PrimitiveUnboxingDelegate BYTE
Byte
types.public static final PrimitiveUnboxingDelegate SHORT
Short
types.public static final PrimitiveUnboxingDelegate CHARACTER
Character
types.public static final PrimitiveUnboxingDelegate INTEGER
Integer
types.public static final PrimitiveUnboxingDelegate LONG
Long
types.public static final PrimitiveUnboxingDelegate FLOAT
Float
types.public static final PrimitiveUnboxingDelegate DOUBLE
Double
types.public static PrimitiveUnboxingDelegate[] values()
for (PrimitiveUnboxingDelegate c : PrimitiveUnboxingDelegate.values()) System.out.println(c);
public static PrimitiveUnboxingDelegate valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static PrimitiveUnboxingDelegate forPrimitive(TypeDefinition typeDefinition)
typeDefinition
- A description of the primitive type.public static PrimitiveUnboxingDelegate.UnboxingResponsible forReferenceType(TypeDefinition typeDefinition)
PrimitiveUnboxingDelegate.UnboxingResponsible
in order to then check if the given type is assignable to the inferred wrapper type.typeDefinition
- A non-primitive type.protected TypeDescription.Generic getWrapperType()
public boolean isValid()
isValid
in interface StackManipulation
false
, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)
apply
in interface StackManipulation
methodVisitor
- The method visitor used to write the method implementation to.implementationContext
- The context of the current implementation.Copyright © 2014–2024. All rights reserved.