net.bytebuddy.implementation.bytecode.collection.CollectionFactory that is capable of
creating an array of a given type with any number of given values.
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | ArrayFactory.ArrayCreator
An array creator is responsible for providing correct byte code instructions for creating an array and for storing values into it. |
| protected class | ArrayFactory.ArrayStackManipulation
A stack manipulation for creating an array as defined by the enclosing array factory. |
| Modifier and Type | Field and Description |
|---|---|
| private final ArrayFactory. | arrayCreator
The array creator delegate that supplies suitable opcodes for the creation of an array and the storage of values inside it. |
| private final TypeDescription. | componentType
The component type of the array this array factory is creating. |
| private final StackManipulation. | sizeDecrease
The decrease of stack size after each value storage operation. |
| Access | Constructor and Description |
|---|---|
| protected | ArrayFactory(TypeDescription.
The component type of the array factory. componentType,The array creator responsible for providing the correct byte code instructions. arrayCreatorCreates a new array factory with a given
|
| Modifier and Type | Method and Description |
|---|---|
| public static ArrayFactory | Returns: A new array factory for the given type.The component type of the array that is to be build. componentTypeCreates a new array factory for a given component type. |
| public TypeDescription. | getComponentType()
Implements net. |
| private static ArrayFactory. | Returns: A suitable array creator.The component type of the array to be created. componentType)Creates a suitable array creator for the given component type. |
| public StackManipulation | withValues(List<? extends StackManipulation>
A list of stack manipulations loading the values to be stored in the collection that is
created by this factory in their given order. stackManipulations)Implements net. |
| arrayCreator | back to summary |
|---|---|
| private final ArrayFactory. The array creator delegate that supplies suitable opcodes for the creation of an array and the storage of values inside it. | |
| componentType | back to summary |
|---|---|
| private final TypeDescription. The component type of the array this array factory is creating. | |
| sizeDecrease | back to summary |
|---|---|
| private final StackManipulation. The decrease of stack size after each value storage operation. | |
| ArrayFactory | back to summary |
|---|---|
| protected ArrayFactory(TypeDescription. Creates a new array factory with a given
| |
| forType | back to summary |
|---|---|
| public static ArrayFactory forType(TypeDescription. Creates a new array factory for a given component type.
| |
| getComponentType | back to summary |
|---|---|
| public TypeDescription. Implements net. Doc from net. The component type of this factory.
| |
| makeArrayCreatorFor | back to summary |
|---|---|
| private static ArrayFactory. Creates a suitable array creator for the given component type.
| |
| withValues | back to summary |
|---|---|
| public StackManipulation withValues(List<? extends StackManipulation> stackManipulations) Implements net. Doc from net. Applies this collection factory in order to build a new collection where each element is represented by the given stack manipulations.
| |
| Modifier and Type | Class and Description |
|---|---|
| public static enum | ArrayFactory.ArrayCreator.ForPrimitiveType
An array creator implementation for primitive types. |
| public static class | ArrayFactory.ArrayCreator.ForReferenceType
An array creator implementation for reference types. |
| Modifier and Type | Field and Description |
|---|---|
| public static final StackManipulation. | ARRAY_CREATION_SIZE_CHANGE
The creation of an array consumes one slot on the operand stack and adds a new value to it. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The correct storage opcode for the represented type.The opcode instruction for storing a value of the component type inside an array. |
| ARRAY_CREATION_SIZE_CHANGE | back to summary |
|---|---|
| public static final StackManipulation. The creation of an array consumes one slot on the operand stack and adds a new value to it. Therefore, the operand stack's size is not altered. | |
| getStorageOpcode | back to summary |
|---|---|
| public int getStorageOpcode() The opcode instruction for storing a value of the component type inside an array.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ArrayFactory. | BOOLEAN
An array creator for creating |
| public static final ArrayFactory. | BYTE
An array creator for creating |
| public static final ArrayFactory. | CHARACTER
An array creator for creating |
| private final int | creationOpcode
The opcode for creating an array of this type. |
| public static final ArrayFactory. | DOUBLE
An array creator for creating |
| public static final ArrayFactory. | FLOAT
An array creator for creating |
| public static final ArrayFactory. | INTEGER
An array creator for creating |
| public static final ArrayFactory. | LONG
An array creator for creating |
| public static final ArrayFactory. | SHORT
An array creator for creating |
| private final int | storageOpcode
The opcode for storing a value in an array of this type. |
| Access | Constructor and Description |
|---|---|
| private | ForPrimitiveType(int
The opcode for creating an array of this type. creationOpcode, int The opcode for storing a value in an array of this type. storageOpcode)Creates a new primitive array creator. |
| Modifier and Type | Method and Description |
|---|---|
| public StackManipulation. | apply(MethodVisitor
The method visitor used to write the method implementation to. methodVisitor, Implementation.The context of the current implementation. implementationContextImplements net. |
| public int | getStorageOpcode()
Implements net. |
| public boolean | isValid()
Implements net. |
| public static ArrayFactory. | |
| public static ArrayFactory. |
| BOOLEAN | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| BYTE | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| CHARACTER | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| creationOpcode | back to summary |
|---|---|
| private final int creationOpcode The opcode for creating an array of this type. | |
| DOUBLE | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| FLOAT | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| INTEGER | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| LONG | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| SHORT | back to summary |
|---|---|
| public static final ArrayFactory. An array creator for creating | |
| storageOpcode | back to summary |
|---|---|
| private final int storageOpcode The opcode for storing a value in an array of this type. | |
| ForPrimitiveType | back to summary |
|---|---|
| private ForPrimitiveType(int creationOpcode, int storageOpcode) Creates a new primitive array creator.
| |
| apply | back to summary |
|---|---|
| public StackManipulation. Implements net. Doc from net. Applies the stack manipulation that is described by this instance.
| |
| getStorageOpcode | back to summary |
|---|---|
| public int getStorageOpcode() Implements net. Doc from net. The opcode instruction for storing a value of the component type inside an array.
| |
| isValid | back to summary |
|---|---|
| public boolean isValid() Implements net. Doc from net. Determines if this stack manipulation is valid.
| |
| valueOf | back to summary |
|---|---|
| public static ArrayFactory. | |
| values | back to summary |
|---|---|
| public static ArrayFactory. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | internalTypeName
The internal name of this array's non-primitive component type. |
| Access | Constructor and Description |
|---|---|
| protected | ForReferenceType(TypeDescription
The internal name of this array's non-primitive component type. referenceType)Creates a new array creator for a reference type. |
| Modifier and Type | Method and Description |
|---|---|
| public StackManipulation. | apply(MethodVisitor
The method visitor used to write the method implementation to. methodVisitor, Implementation.The context of the current implementation. implementationContextImplements net. |
| public int | getStorageOpcode()
Implements net. |
| internalTypeName | back to summary |
|---|---|
| private final String internalTypeName The internal name of this array's non-primitive component type. | |
| ForReferenceType | back to summary |
|---|---|
| protected ForReferenceType(TypeDescription referenceType) Creates a new array creator for a reference type.
| |
| apply | back to summary |
|---|---|
| public StackManipulation. Implements net. Doc from net. Applies the stack manipulation that is described by this instance.
| |
| getStorageOpcode | back to summary |
|---|---|
| public int getStorageOpcode() Implements net. Doc from net. The opcode instruction for storing a value of the component type inside an array.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final List | stackManipulations
A list of value load instructions that are to be stored inside the created array. |
| Access | Constructor and Description |
|---|---|
| protected | ArrayStackManipulation(List<? extends StackManipulation>
A list of value load instructions that are to be stored inside the created array. stackManipulations)Creates a new array loading instruction. |
| Modifier and Type | Method and Description |
|---|---|
| public StackManipulation. | apply(MethodVisitor
The method visitor used to write the method implementation to. methodVisitor, Implementation.The context of the current implementation. implementationContextImplements net. |
| public boolean | isValid()
Implements net. |
| stackManipulations | back to summary |
|---|---|
| private final List<? extends StackManipulation> stackManipulations A list of value load instructions that are to be stored inside the created array. | |
| ArrayStackManipulation | back to summary |
|---|---|
| protected ArrayStackManipulation(List<? extends StackManipulation> stackManipulations) Creates a new array loading instruction.
| |
| apply | back to summary |
|---|---|
| public StackManipulation. Implements net. Doc from net. Applies the stack manipulation that is described by this instance.
| |
| isValid | back to summary |
|---|---|
| public boolean isValid() Implements net. Doc from net. Determines if this stack manipulation is valid.
| |