public enum StackSize extends Enum<StackSize>
Enum Constant and Description |
---|
DOUBLE
A double slot stack size which is required by
long and double values. |
SINGLE
A single slot stack size.
|
ZERO
An empty stack size.
|
Modifier and Type | Method and Description |
---|---|
int |
getSize()
The numeric value of this stack size representation.
|
StackSize |
maximum(StackSize stackSize)
Determines the maximum of two stack size representations.
|
static StackSize |
of(Class<?> type)
Finds the operand stack size of a given Java type.
|
static int |
of(Collection<? extends TypeDefinition> typeDefinitions)
Computes the stack size of all supplied types.
|
static StackSize |
of(int size)
Represents a numeric size as a
StackSize . |
static int |
of(TypeDefinition... typeDefinition)
Computes the stack size of all supplied types.
|
StackManipulation.Size |
toDecreasingSize()
Creates an instance of a
StackManipulation.Size
that describes a stack decrease of this size. |
StackManipulation.Size |
toIncreasingSize()
Creates an instance of a
StackManipulation.Size
that describes a stack growth of this size. |
static StackSize |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StackSize[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StackSize ZERO
public static final StackSize SINGLE
public static final StackSize DOUBLE
long
and double
values.public static StackSize[] values()
for (StackSize c : StackSize.values()) System.out.println(c);
public static StackSize valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static StackSize of(Class<?> type)
type
- The type of interest.public static StackSize of(int size)
StackSize
.size
- The size to represent. Must be 0
, 1
or 2
.public static int of(TypeDefinition... typeDefinition)
typeDefinition
- The types for which to compute the size.public static int of(Collection<? extends TypeDefinition> typeDefinitions)
typeDefinitions
- The types for which to compute the size.public int getSize()
public StackManipulation.Size toIncreasingSize()
StackManipulation.Size
that describes a stack growth of this size.public StackManipulation.Size toDecreasingSize()
StackManipulation.Size
that describes a stack decrease of this size.Copyright © 2014–2025. All rights reserved.