How about adding the code to [`JavaMapping#getModMethod`](https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/query/func/JavaMapping.java#L164-L183)?