public MethodType down(MethodType type) {
Class[] types = new Class[reorder.length];
for (int i = 0; i < reorder.length; i++) {
int typeIndex = reorder[i];
if (typeIndex < 0 || typeIndex >= type.parameterCount()) {
throw new InvalidTransformException("one or more permute indices (" + Arrays.toString(reorder) + ") out of bounds for " + source);
}
types[i] = type.parameterType(reorder[i]);
}
return MethodType.methodType(type.returnType(), types);