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 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