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

public sealed Enum Removal

extends Enum<Removal>
implements StackManipulation
Class Inheritance
All Implemented Interfaces
net.bytebuddy.implementation.bytecode.StackManipulation
Imports
net.bytebuddy.description.type.TypeDefinition, net.bytebuddy.implementation.Implementation, net.bytebuddy.jar.asm.MethodVisitor, .Opcodes

Removes a value from the operand stack.

Field Summary

Modifier and TypeField and Description
public static final Removal
DOUBLE

A removal of a double-sized value.

private final int
opcode

The opcode to execute for the removal.

public static final Removal
SINGLE

A removal of a single-sized value.

private final StackManipulation.Size
size

The size impact of the removal onto the operand stack.

public static final Removal
ZERO

A removal of no value.

Constructor Summary

AccessConstructor and Description
private
Removal(StackSize
The size impact of the removal onto the operand stack.
stackSize
,
int
The opcode to execute for the removal.
opcode
)

Creates a new removal stack manipulation.

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 boolean
isValid()

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

Determines if this stack manipulation is valid.
public static StackManipulation

Returns:

A stack manipulation that represents the removal.
of
(TypeDefinition
The type to remove from the stack.
typeDefinition
)

Removes a value from the operand stack dependant of its size.

public static Removal
public static Removal[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DOUBLEback to summary
public static final Removal DOUBLE

A removal of a double-sized value.

opcodeback to summary
private final int opcode

The opcode to execute for the removal.

SINGLEback to summary
public static final Removal SINGLE

A removal of a single-sized value.

sizeback to summary
private final StackManipulation.Size size

The size impact of the removal onto the operand stack.

ZEROback to summary
public static final Removal ZERO

A removal of no value. This corresponds a no-op instruction.

Constructor Detail

Removalback to summary
private Removal(StackSize stackSize, int opcode)

Creates a new removal stack manipulation.

Parameters
stackSize:StackSize

The size impact of the removal onto the operand stack.

opcode:int

The opcode to execute for the removal.

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.

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.

ofback to summary
public static StackManipulation of(TypeDefinition typeDefinition)

Removes a value from the operand stack dependant of its size.

Parameters
typeDefinition:TypeDefinition

The type to remove from the stack.

Returns:StackManipulation

A stack manipulation that represents the removal.

valueOfback to summary
public static Removal valueOf(String name)
valuesback to summary
public static Removal[] values()