Package org.codehaus.groovy.vmplugin.v8

# Class IndyArrayAccess

java.lang.Object
org.codehaus.groovy.vmplugin.v8.IndyArrayAccess

public class IndyArrayAccess extends Object
Class for handling array access through invokedynamic using static callsite information

Since:
  2.5.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IndyArrayAccess()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MethodHandle`
  `arrayGet(MethodType type)`
  Returns an array getter handle adapted to the supplied call-site type.
  `static MethodHandle`
  `arraySet(MethodType type)`
  Returns an array setter handle adapted to the supplied call-site type.
  `static boolean`
  `notNegative(int index)`
  Tests whether an array index is already non-negative.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IndyArrayAccess

    public IndyArrayAccess()

- ## Method Details

  - ### notNegative

    public static boolean notNegative(int index)
    Tests whether an array index is already non-negative.
    Parameters:
      `index` - the candidate index
    Returns:
      `true` if the index is non-negative

  - ### arrayGet

    public static MethodHandle arrayGet(MethodType type)
    Returns an array getter handle adapted to the supplied call-site type.
    Parameters:
      `type` - the target call-site type
    Returns:
      a getter handle for the array element access

  - ### arraySet

    public static MethodHandle arraySet(MethodType type)
    Returns an array setter handle adapted to the supplied call-site type.
    Parameters:
      `type` - the target call-site type
    Returns:
      a setter handle for the array element access