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

public final Enum StackSize

extends Enum<StackSize>
Class Inheritance
Imports
net.bytebuddy.description.type.TypeDefinition, java.util.Arrays, .Collection

Represents the size of a Java type on the operand stack.

Field Summary

Modifier and TypeField and Description
public static final StackSize
DOUBLE

A double slot stack size which is required by long and double values.

public static final StackSize
SINGLE

A single slot stack size.

private final int
size

The size of the stack this instance represents.

public static final StackSize
ZERO

An empty stack size.

Constructor Summary

AccessConstructor and Description
private
StackSize(int
The size of the stack this instance represents.
size
)

Creates a new stack size.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

An integer representing the operand stack size.
getSize
()

The numeric value of this stack size representation.

public StackSize

Returns:

The maximum of this and the other stack size.
maximum
(StackSize
The other stack size representation.
stackSize
)

Determines the maximum of two stack size representations.

public static StackSize

Returns:

The given type's operand stack size.
of
(Class<?>
The type of interest.
type
)

Finds the operand stack size of a given Java type.

public static StackSize

Returns:

A stack size representation for the given value.
of
(int
The size to represent. Must be 0, 1 or 2.
size
)

Represents a numeric size as a StackSize.

public static int

Returns:

The total size of all types.
of
(TypeDefinition...
The types for which to compute the size.
typeDefinition
)

Computes the stack size of all supplied types.

public static int

Returns:

The total size of all types.
of
(Collection<? extends TypeDefinition>
The types for which to compute the size.
typeDefinitions
)

Computes the stack size of all supplied types.

public StackManipulation.Size

Returns:

A stack size decrease by the size represented by this stack size.
toDecreasingSize
()

Creates an instance of a StackManipulation.Size that describes a stack decrease of this size.

public StackManipulation.Size

Returns:

A stack size growth by the size represented by this stack size.
toIncreasingSize
()

Creates an instance of a StackManipulation.Size that describes a stack growth of this size.

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

Field Detail

DOUBLEback to summary
public static final StackSize DOUBLE

A double slot stack size which is required by long and double values.

SINGLEback to summary
public static final StackSize SINGLE

A single slot stack size.

sizeback to summary
private final int size

The size of the stack this instance represents.

ZEROback to summary
public static final StackSize ZERO

An empty stack size.

Constructor Detail

StackSizeback to summary
private StackSize(int size)

Creates a new stack size.

Parameters
size:int

The size of the stack this instance represents.

Method Detail

getSizeback to summary
public int getSize()

The numeric value of this stack size representation.

Returns:int

An integer representing the operand stack size.

maximumback to summary
public StackSize maximum(StackSize stackSize)

Determines the maximum of two stack size representations.

Parameters
stackSize:StackSize

The other stack size representation.

Returns:StackSize

The maximum of this and the other stack size.

ofback to summary
public static StackSize of(Class<?> type)

Finds the operand stack size of a given Java type.

Parameters
type:Class<?>

The type of interest.

Returns:StackSize

The given type's operand stack size.

ofback to summary
public static StackSize of(int size)

Represents a numeric size as a StackSize.

Parameters
size:int

The size to represent. Must be 0, 1 or 2.

Returns:StackSize

A stack size representation for the given value.

ofback to summary
public static int of(TypeDefinition... typeDefinition)

Computes the stack size of all supplied types.

Parameters
typeDefinition:TypeDefinition[]

The types for which to compute the size.

Returns:int

The total size of all types.

ofback to summary
public static int of(Collection<? extends TypeDefinition> typeDefinitions)

Computes the stack size of all supplied types.

Parameters
typeDefinitions:Collection<? extends TypeDefinition>

The types for which to compute the size.

Returns:int

The total size of all types.

toDecreasingSizeback to summary
public StackManipulation.Size toDecreasingSize()

Creates an instance of a StackManipulation.Size that describes a stack decrease of this size.

Returns:StackManipulation.Size

A stack size decrease by the size represented by this stack size.

toIncreasingSizeback to summary
public StackManipulation.Size toIncreasingSize()

Creates an instance of a StackManipulation.Size that describes a stack growth of this size.

Returns:StackManipulation.Size

A stack size growth by the size represented by this stack size.

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