方法一:直接打印:
var HashMap = Java.use('java.util.HashMap');
console.log("map:" + Java.cast(map, HashMap).toString());
// 输出展示:map -> {onlyCanExchange=0, pageSize=5, pageNum=1}
方法二:借助Gson转Json打印(推荐)
var Gson = Java.use('com.google.gson.Gson').$new();
console.log("map -> " + Gson.toJsonTree(map).getAsJsonObject());
// 输出展示:map -> {"onlyCanExchange":0,"pageSize":"5","pageNum":"1"}