public enum PrimitiveUnboxingDelegate extends Enum<PrimitiveUnboxingDelegate> implements StackManipulation
Modifier and Type | Class and Description |
---|---|
static interface |
PrimitiveUnboxingDelegate.UnboxingResponsible
Implementations represent an unboxing delegate that is able to perform the unboxing operation.
|
StackManipulation.Compound, StackManipulation.Size
Enum Constant and Description |
---|
BOOLEAN |
BYTE |
CHARACTER |
DOUBLE |
FLOAT |
INTEGER |
LONG |
SHORT |
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.
|
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
public static final PrimitiveUnboxingDelegate BYTE
public static final PrimitiveUnboxingDelegate SHORT
public static final PrimitiveUnboxingDelegate CHARACTER
public static final PrimitiveUnboxingDelegate INTEGER
public static final PrimitiveUnboxingDelegate LONG
public static final PrimitiveUnboxingDelegate FLOAT
public static final PrimitiveUnboxingDelegate DOUBLE
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.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()
StackManipulation
isValid
in interface StackManipulation
false
, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Instrumentation.Context instrumentationContext)
StackManipulation
apply
in interface StackManipulation
methodVisitor
- The method visitor used to write the method implementation to.instrumentationContext
- The context of the current instrumentation.Copyright © 2014. All rights reserved.