Home | History | Annotate | Download | only in invoke

Lines Matching defs:arrayType

793      * by a single array parameter of type {@code arrayType}.
861 * @param arrayType usually {@code Object[]}, the type of the array argument from which to extract the spread arguments
865 * @throws NullPointerException if {@code arrayType} is a null reference
866 * @throws IllegalArgumentException if {@code arrayType} is not an array type,
875 public MethodHandle asSpreader(Class<?> arrayType, int arrayLength) {
876 MethodType postSpreadType = asSpreaderChecks(arrayType, arrayLength);
881 MethodType adapterType = dropArrayArgs.appendParameterTypes(arrayType);
890 private MethodType asSpreaderChecks(Class<?> arrayType, int arrayLength) {
891 spreadArrayChecks(arrayType, arrayLength);
895 Class<?> arrayElement = arrayType.getComponentType();
909 MethodType needType = mtype.asSpreaderType(arrayType, arrayLength);
916 private void spreadArrayChecks(Class<?> arrayType, int arrayLength) {
917 arrayType.getComponentType();
919 throw newIllegalArgumentException("not an array type", arrayType);
936 * parameter (usually of type {@code arrayType}) is replaced by
937 * {@code arrayLength} parameters whose type is element type of {@code arrayType}.
944 * arguments by a single new array of type {@code arrayType}, whose elements
951 * (<em>Note:</em> The {@code arrayType} is often identical to the last
968 // arrayType can be a subtype of Object[]
977 // arrayType can be any primitive array type
987 * @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments
991 * @throws NullPointerException if {@code arrayType} is a null reference
992 * @throws IllegalArgumentException if {@code arrayType} is not an array type
993 * or {@code arrayType} is not assignable to this method handle's trailing parameter type,
1001 public MethodHandle asCollector(Class<?> arrayType, int arrayLength) {
1002 asCollectorChecks(arrayType, arrayLength);
1004 return new Transformers.Collector(this, arrayType, arrayLength);
1009 * Return false if the last parameter is not an exact match to arrayType.
1011 /*non-public*/ boolean asCollectorChecks(Class<?> arrayType, int arrayLength) {
1012 spreadArrayChecks(arrayType, arrayLength);
1016 if (lastParam == arrayType) return true;
1017 if (lastParam.isAssignableFrom(arrayType)) return false;
1019 throw newIllegalArgumentException("array type not assignable to trailing argument", this, arrayType);
1033 * {@code arrayType}, even if the target has a different
1038 * is identical to {@code arrayType}.
1063 * a new array of type {@code arrayType}, whose elements
1162 * @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments
1165 * @throws NullPointerException if {@code arrayType} is a null reference
1166 * @throws IllegalArgumentException if {@code arrayType} is not an array type
1167 * or {@code arrayType} is not assignable to this method handle's trailing parameter type
1172 public MethodHandle asVarargsCollector(Class<?> arrayType) {
1173 arrayType.getClass(); // explicit NPE
1174 boolean lastMatch = asCollectorChecks(arrayType, 0);