java.lang.Object
java.lang.Enum<ArrayAccess>
net.bytebuddy.implementation.bytecode.collection.ArrayAccess
All Implemented Interfaces:
Serializable, Comparable<ArrayAccess>, java.lang.constant.Constable

public enum ArrayAccess extends Enum<ArrayAccess>
Allows accessing array values.
  • Enum Constant Details

    • BYTE

      public static final ArrayAccess BYTE
      Access for a byte- or boolean-typed array.
    • SHORT

      public static final ArrayAccess SHORT
      Access for a short-typed array.
    • CHARACTER

      public static final ArrayAccess CHARACTER
      Access for a char-typed array.
    • INTEGER

      public static final ArrayAccess INTEGER
      Access for a int-typed array.
    • LONG

      public static final ArrayAccess LONG
      Access for a long-typed array.
    • FLOAT

      public static final ArrayAccess FLOAT
      Access for a float-typed array.
    • DOUBLE

      public static final ArrayAccess DOUBLE
      Access for a double-typed array.
    • REFERENCE

      public static final ArrayAccess REFERENCE
      Access for a reference-typed array.
  • Field Details

    • loadOpcode

      private final int loadOpcode
      The opcode used for loading a value.
    • storeOpcode

      private final int storeOpcode
      The opcode used for storing a value.
    • stackSize

      private final StackSize stackSize
      The size of the array's component value.
  • Constructor Details

    • ArrayAccess

      private ArrayAccess(int loadOpcode, int storeOpcode, StackSize stackSize)
      Creates a new array access.
      Parameters:
      loadOpcode - The opcode used for loading a value.
      storeOpcode - The opcode used for storing a value.
      stackSize - The size of the array's component value.
  • Method Details

    • values

      public static ArrayAccess[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ArrayAccess valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static ArrayAccess of(TypeDefinition componentType)
      Locates an array accessor by the array's component type.
      Parameters:
      componentType - The array's component type.
      Returns:
      An array accessor for the given type.
    • load

      public StackManipulation load()
      Creates a value-loading stack manipulation.
      Returns:
      A value-loading stack manipulation.
    • store

      public StackManipulation store()
      Creates a value-storing stack manipulation.
      Returns:
      A value-storing stack manipulation.
    • forEach

      public StackManipulation forEach(List<? extends StackManipulation> processInstructions)
      Applies a stack manipulation to the values of an array. The array must have at least as many values as the list has elements.
      Parameters:
      processInstructions - The elements to apply.
      Returns:
      A stack manipulation that applies the supplied instructions.