Top Description Inners Fields Constructors Methods
net.bytebuddy.implementation.bytecode.constant

public final Enum FloatConstant

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

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
FloatConstant.ConstantPool

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

Field Summary

Modifier and TypeField and Description
public static final FloatConstant
ONE

A float constant of value 1.0f.

private final int
opcode

The shortcut opcode for loading a float constant.

private static final StackManipulation.Size
SIZE

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

public static final FloatConstant
TWO

A float constant of value 2.0f.

public static final FloatConstant
ZERO

A float constant of value 0.0f.

Constructor Summary

AccessConstructor and Description
private
FloatConstant(int
The shortcut opcode for loading a float constant.
opcode
)

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

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

public boolean
isValid()

Implements net.bytebuddy.implementation.bytecode.StackManipulation.isValid.

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

Field Detail

ONEback to summary
public static final FloatConstant ONE

A float constant of value 1.0f.

opcodeback to summary
private final int opcode

The shortcut opcode for loading a float constant.

SIZEback to summary
private static final StackManipulation.Size SIZE

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

TWOback to summary
public static final FloatConstant TWO

A float constant of value 2.0f.

ZEROback to summary
public static final FloatConstant ZERO

A float constant of value 0.0f.

Constructor Detail

FloatConstantback to summary
private FloatConstant(int opcode)

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

Parameters
opcode:int

The shortcut opcode for loading a float constant.

Method Detail

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

Implements net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from net.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(float value)

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

The float value to load onto the stack.

Returns:StackManipulation

A stack manipulation for loading the given float value.

isValidback to summary
public boolean isValid()

Implements net.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Doc from net.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 FloatConstant valueOf(String name)
valuesback to summary
public static FloatConstant[] values()
net.bytebuddy.implementation.bytecode.constant back to summary

protected Class FloatConstant.ConstantPool

extends AbstractBase
Class Inheritance
Annotations
@Enhance

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

Field Summary

Modifier and TypeField and Description
private final float
value

The float value to be loaded onto the operand stack.

Constructor Summary

AccessConstructor and Description
protected
ConstantPool(float
The float 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 net.bytebuddy.implementation.bytecode.StackManipulation.apply.

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

Field Detail

valueback to summary
private final float value

The float value to be loaded onto the operand stack.

Constructor Detail

ConstantPoolback to summary
protected ConstantPool(float value)

Creates a new constant pool load operation.

Parameters
value:float

The float value to be loaded onto the operand stack.

Method Detail

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

Implements net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from net.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.