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.Compound, StackManipulation.Illegal, StackManipulation.LegalTrivial, StackManipulation.Size| 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(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext)
Applies the stack manipulation that is described by this instance.
|
protected static PrimitiveUnboxingDelegate |
forPrimitive(TypeDescription typeDescription)
Locates a primitive unboxing delegate for a given primitive type.
|
static PrimitiveUnboxingDelegate.UnboxingResponsible |
forReferenceType(TypeDescription typeDescription)
Creates an unboxing responsible that is capable of unboxing a wrapper type.
|
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 nullprotected static PrimitiveUnboxingDelegate forPrimitive(TypeDescription typeDescription)
typeDescription - A description of the primitive type.public static PrimitiveUnboxingDelegate.UnboxingResponsible forReferenceType(TypeDescription typeDescription)
PrimitiveUnboxingDelegate.UnboxingResponsible
in order to then check if the given type is assignable to the inferred wrapper type.typeDescription - A non-primitive type.public boolean isValid()
StackManipulationisValid in interface StackManipulationfalse, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Instrumentation.Context instrumentationContext)
StackManipulationapply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.instrumentationContext - The context of the current instrumentation.Copyright © 2014. All rights reserved.