Package org.codehaus.groovy.vmplugin.v8
Class IndyArrayAccess
java.lang.Object
org.codehaus.groovy.vmplugin.v8.IndyArrayAccess
Class for handling array access through invokedynamic using static callsite information
- Since:
- 2.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MethodHandlearrayGet(MethodType type) Returns an array getter handle adapted to the supplied call-site type.static MethodHandlearraySet(MethodType type) Returns an array setter handle adapted to the supplied call-site type.static booleannotNegative(int index) Tests whether an array index is already non-negative.
-
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:
trueif the index is non-negative
-
arrayGet
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
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
-