@HashCodeAndEqualsPlugin.Enhance public static class StackManipulation.Size extends java.lang.Object
StackManipulation.| Modifier and Type | Field and Description |
|---|---|
private int |
maximalSize
The maximal size of stack slots this stack manipulation ever requires.
|
private int |
sizeImpact
The impact of any size operation onto the operand stack.
|
| Constructor and Description |
|---|
Size(int sizeImpact,
int maximalSize)
Creates an immutable descriptor of the size change that is implied by some stack manipulation.
|
| Modifier and Type | Method and Description |
|---|---|
private StackManipulation.Size |
aggregate(int sizeChange,
int interimMaximalSize)
Aggregates a size change with this stack manipulation size.
|
StackManipulation.Size |
aggregate(StackManipulation.Size other)
Concatenates this size representation with another size representation in order to represent the size
change that is represented by both alterations of the operand stack size.
|
int |
getMaximalSize()
Returns the maximal interim size of the operand stack that is represented by this instance.
|
int |
getSizeImpact()
Returns the size change on the operand stack that is represented by this instance.
|
private final int sizeImpact
private final int maximalSize
public Size(int sizeImpact,
int maximalSize)
sizeImpact - The change of the size of the operand stack that is implied by some stack manipulation.maximalSize - The maximal stack size that is required for executing this stack manipulation. Should
never be negative number.public int getSizeImpact()
public int getMaximalSize()
public StackManipulation.Size aggregate(StackManipulation.Size other)
other - The other size representation.private StackManipulation.Size aggregate(int sizeChange, int interimMaximalSize)
sizeChange - The change in size the other operation implies.interimMaximalSize - The interim maximal size of the operand stack that the other operation requires
at least to function.