Home | History | Annotate | Download | only in invoke

Lines Matching refs:arrayLength

792      * {@code arrayLength} parameters of the target's type are replaced
862 * @param arrayLength the number of arguments to spread from an incoming array argument
868 * {@code arrayLength} parameter types,
869 * or if {@code arrayLength} is negative,
875 public MethodHandle asSpreader(Class<?> arrayType, int arrayLength) {
876 MethodType postSpreadType = asSpreaderChecks(arrayType, arrayLength);
880 (targetParamCount - arrayLength), targetParamCount);
883 return new Transformers.Spreader(this, adapterType, arrayLength);
890 private MethodType asSpreaderChecks(Class<?> arrayType, int arrayLength) {
891 spreadArrayChecks(arrayType, arrayLength);
893 if (nargs < arrayLength || arrayLength < 0)
898 for (int i = nargs - arrayLength; i < nargs; i++) {
909 MethodType needType = mtype.asSpreaderType(arrayType, arrayLength);
916 private void spreadArrayChecks(Class<?> arrayType, int arrayLength) {
920 if ((arrayLength & 0x7F) != arrayLength) {
921 if ((arrayLength & 0xFF) != arrayLength)
922 throw newIllegalArgumentException("array length is not legal", arrayLength);
923 assert(arrayLength >= 128);
926 throw newIllegalArgumentException("array length is not legal for long[] or double[]", arrayLength);
937 * {@code arrayLength} parameters whose type is element type of {@code arrayType}.
943 * When called, the adapter replaces its trailing {@code arrayLength}
949 * (The array may also be a shared constant when {@code arrayLength} is zero.)
988 * @param arrayLength the number of arguments to collect into a new array argument
994 * or {@code arrayLength} is not a legal array size,
1001 public MethodHandle asCollector(Class<?> arrayType, int arrayLength) {
1002 asCollectorChecks(arrayType, arrayLength);
1004 return new Transformers.Collector(this, arrayType, arrayLength);
1011 /*non-public*/ boolean asCollectorChecks(Class<?> arrayType, int arrayLength) {
1012 spreadArrayChecks(arrayType, arrayLength);