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

public final Enum Subtraction

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

A stack manipulation that subtracts two numbers on the operand stack.

Field Summary

Modifier and TypeField and Description
public static final Subtraction
DOUBLE

Subtracts two doubles.

public static final Subtraction
FLOAT

Subtracts two floats.

public static final Subtraction
INTEGER

Subtracts two integers or integer-compatible values.

public static final Subtraction
LONG

Subtracts two longs.

private final int
opcode

The opcode to apply.

private final StackSize
stackSize

The stack size of the subtracted primitive.

Constructor Summary

AccessConstructor and Description
private
Subtraction(int
The opcode to apply.
opcode
,
StackSize
The stack size of the subtracted primitive.
stackSize
)

Creates a new subtraction.

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 Subtraction
public static Subtraction[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DOUBLEback to summary
public static final Subtraction DOUBLE

Subtracts two doubles.

FLOATback to summary
public static final Subtraction FLOAT

Subtracts two floats.

INTEGERback to summary
public static final Subtraction INTEGER

Subtracts two integers or integer-compatible values.

LONGback to summary
public static final Subtraction LONG

Subtracts two longs.

opcodeback to summary
private final int opcode

The opcode to apply.

stackSizeback to summary
private final StackSize stackSize

The stack size of the subtracted primitive.

Constructor Detail

Subtractionback to summary
private Subtraction(int opcode, StackSize stackSize)

Creates a new subtraction.

Parameters
opcode:int

The opcode to apply.

stackSize:StackSize

The stack size of the subtracted primitive.

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.

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