Class ByteCodeAppender.Size
- java.lang.Object
-
- net.bytebuddy.implementation.bytecode.ByteCodeAppender.Size
-
- Enclosing interface:
- ByteCodeAppender
@Enhance public static class ByteCodeAppender.Size extends java.lang.Object
An immutable description of both the operand stack size and the size of the local variable array that is required to run the code generated by thisByteCodeAppender
.
-
-
Field Summary
Fields Modifier and Type Field Description private int
localVariableSize
The size of the local variable array.private int
operandStackSize
The size of the operand stack.static ByteCodeAppender.Size
ZERO
A size of zero.
-
Constructor Summary
Constructors Constructor Description Size(int operandStackSize, int localVariableSize)
Creates a size representation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLocalVariableSize()
Returns the required size of the local variable array.int
getOperandStackSize()
Returns the required operand stack size.ByteCodeAppender.Size
merge(ByteCodeAppender.Size other)
Merges two sizes in order to describe the size that is required by both size descriptions.
-
-
-
Field Detail
-
ZERO
public static final ByteCodeAppender.Size ZERO
A size of zero.
-
operandStackSize
private final int operandStackSize
The size of the operand stack.
-
localVariableSize
private final int localVariableSize
The size of the local variable array.
-
-
Constructor Detail
-
Size
public Size(int operandStackSize, int localVariableSize)
Creates a size representation.- Parameters:
operandStackSize
- The operand stack size that is required for running given byte code.localVariableSize
- The local variable array size that is required for running given byte code.
-
-
Method Detail
-
getOperandStackSize
public int getOperandStackSize()
Returns the required operand stack size.- Returns:
- The required operand stack size.
-
getLocalVariableSize
public int getLocalVariableSize()
Returns the required size of the local variable array.- Returns:
- The required size of the local variable array.
-
merge
public ByteCodeAppender.Size merge(ByteCodeAppender.Size other)
Merges two sizes in order to describe the size that is required by both size descriptions.- Parameters:
other
- The other size description.- Returns:
- A size description incorporating both size requirements.
-
-