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

public final Enum LongConstant

extends Enum<LongConstant>
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 long constant onto the operand stack.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
LongConstant.ConstantPool

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

Field Summary

Modifier and TypeField and Description
public static final LongConstant
ONE

A long constant of value 1L.

private final int
opcode

The shortcut opcode for loading a long constant.

private static final StackManipulation.Size
SIZE

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

public static final LongConstant
ZERO

A long constant of value 0L.

Constructor Summary

AccessConstructor and Description
private
LongConstant(int
The shortcut opcode for loading a long constant.
opcode
)

Creates a new shortcut operation for loading a common long 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 long value.
forValue
(long
The long value to load onto the stack.
value
)

Creates a stack manipulation for loading a long 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 LongConstant
public static LongConstant[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ONEback to summary
public static final LongConstant ONE

A long constant of value 1L.

opcodeback to summary
private final int opcode

The shortcut opcode for loading a long 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 LongConstant ZERO

A long constant of value 0L.

Constructor Detail

LongConstantback to summary
private LongConstant(int opcode)

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

Parameters
opcode:int

The shortcut opcode for loading a long 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(long value)

Creates a stack manipulation for loading a long 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:long

The long value to load onto the stack.

Returns:StackManipulation

A stack manipulation for loading the given long 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 LongConstant valueOf(String name)
valuesback to summary
public static LongConstant[] values()
org.easymock.bytebuddy.implementation.bytecode.constant back to summary

protected Class LongConstant.ConstantPool

extends AbstractBase
Class Inheritance
Annotations
@Enhance

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

Field Summary

Modifier and TypeField and Description
private final long
value

The long value to be loaded onto the operand stack.

Constructor Summary

AccessConstructor and Description
protected
ConstantPool(long
The long 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 long value

The long value to be loaded onto the operand stack.

Constructor Detail

ConstantPoolback to summary
protected ConstantPool(long value)

Creates a new constant pool load operation.

Parameters
value:long

The long 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.