public enum DoubleConstant extends Enum<DoubleConstant> implements StackManipulation
double constant onto the operand stack.| Modifier and Type | Class and Description |
|---|---|
protected static class |
DoubleConstant.ConstantPool
A stack manipulation for loading a
double value from a class's constant pool onto the operand stack. |
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.LegalTrivial, StackManipulation.Size| Enum Constant and Description |
|---|
ONE
A
double constant of value 1.0. |
ZERO
A
double constant of value 0.0. |
| 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 StackManipulation |
forValue(double value)
Creates a stack manipulation for loading a
double value onto the operand stack. |
boolean |
isValid()
Determines if this stack manipulation is valid.
|
static DoubleConstant |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DoubleConstant[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DoubleConstant ZERO
double constant of value 0.0.public static final DoubleConstant ONE
double constant of value 1.0.public static DoubleConstant[] values()
for (DoubleConstant c : DoubleConstant.values()) System.out.println(c);
public static DoubleConstant 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 StackManipulation forValue(double value)
double value onto the operand stack.
This is achieved either by invoking a specific opcode, if any, or by creating a constant pool entry.
value - The double value to load onto the stack.double value.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.