Enum ArrayAccess

    • Enum Constant Detail

      • 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.
    • Method Detail

      • values

        public static ArrayAccess[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ArrayAccess c : ArrayAccess.values())
            System.out.println(c);
        
        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.