Top Description Inners Fields Constructors Methods
org.easymock.bytebuddy.implementation.bytecode.constant

public final Enum DoubleConstant

extends Enum<DoubleConstant>
implements StackManipulation
Class Inheritance
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bytecode.StackManipulation
Imports
org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.implementation.bytecode.StackManipulation, .StackSize, org.easymock.bytebuddy.jar.asm.MethodVisitor, .Opcodes

This class is responsible for loading any double constant onto the operand stack.

Nested and Inner Type Summary

Modifier and TypeClass 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.

Field Summary

Modifier and TypeField and Description
public static final DoubleConstant
ONE

A double constant of value 1.0.

private final int
opcode

The shortcut opcode for loading a double constant.

private static final StackManipulation.Size
SIZE

The size impact of loading a double constant onto the operand stack.

public static final DoubleConstant
ZERO

A double constant of value 0.0.

Constructor Summary

AccessConstructor and Description
private
DoubleConstant(int
The shortcut opcode for loading a double constant.
opcode
)

Creates a new shortcut operation for loading a common double onto the operand stack.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation.Size
apply(MethodVisitor
The method visitor used to write the method implementation to.
methodVisitor
,
Implementation.Context
The context of the current implementation.
implementationContext
)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
public static StackManipulation

Returns:

A stack manipulation for loading the given double value.
forValue
(double
The double value to load onto the stack.
value
)

Creates a stack manipulation for loading a double value onto the operand stack.

public boolean
isValid()

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.
public static DoubleConstant
public static DoubleConstant[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ONEback to summary
public static final DoubleConstant ONE

A double constant of value 1.0.

opcodeback to summary
private final int opcode

The shortcut opcode for loading a double constant.

SIZEback to summary
private static final StackManipulation.Size SIZE

The size impact of loading a double constant onto the operand stack.

ZEROback to summary
public static final DoubleConstant ZERO

A double constant of value 0.0.

Constructor Detail

DoubleConstantback to summary
private DoubleConstant(int opcode)

Creates a new shortcut operation for loading a common double onto the operand stack.

Parameters
opcode:int

The shortcut opcode for loading a double constant.

Method Detail

applyback to summary
public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.

Parameters
methodVisitor:MethodVisitor

The method visitor used to write the method implementation to.

implementationContext:Implementation.Context

The context of the current implementation.

Returns:StackManipulation.Size

The changes to the size of the operand stack that are implied by this stack manipulation.

forValueback to summary
public static StackManipulation forValue(double value)

Creates a stack manipulation for loading a double value onto the operand stack.

 

This is achieved either by invoking a specific opcode, if any, or by creating a constant pool entry.
Parameters
value:double

The double value to load onto the stack.

Returns:StackManipulation

A stack manipulation for loading the given double value.

isValidback to summary
public boolean isValid()

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.

Returns:boolean

If false, this manipulation cannot be applied and should throw an exception.

valueOfback to summary
public static DoubleConstant valueOf(String name)
valuesback to summary
public static DoubleConstant[] values()
org.easymock.bytebuddy.implementation.bytecode.constant back to summary

protected Class DoubleConstant.ConstantPool

extends AbstractBase
Class Inheritance
Annotations
@Enhance

A stack manipulation for loading a double value from a class's constant pool onto the operand stack.

Field Summary

Modifier and TypeField and Description
private final double
value

The double value to be loaded onto the operand stack.

Constructor Summary

AccessConstructor and Description
protected
ConstantPool(double
The double value to be loaded onto the operand stack.
value
)

Creates a new constant pool load operation.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation.Size
apply(MethodVisitor
The method visitor used to write the method implementation to.
methodVisitor
,
Implementation.Context
The context of the current implementation.
implementationContext
)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
Inherited from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase:
isValid

Field Detail

valueback to summary
private final double value

The double value to be loaded onto the operand stack.

Constructor Detail

ConstantPoolback to summary
protected ConstantPool(double value)

Creates a new constant pool load operation.

Parameters
value:double

The double value to be loaded onto the operand stack.

Method Detail

applyback to summary
public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.

Parameters
methodVisitor:MethodVisitor

The method visitor used to write the method implementation to.

implementationContext:Implementation.Context

The context of the current implementation.

Returns:StackManipulation.Size

The changes to the size of the operand stack that are implied by this stack manipulation.