Does the ADMIN restriction apply to classes extending QueryModule as well as those found via reflection?
The QueryModule extension is an early intent to simplify the import of Java code. It hasn't been documented yet, and is subject to change. I agree that it should, and will, be treated different than arbitrary Java code performed via reflection. One of the ideas is to introduce annotations that will control the privileges required for executing a function or class.
Beside that, it's still quite a tricky task to add new modules to BaseX, as most statically known XQuery functions are either statically specified in the Function class, or embedded via EXPath packaging.
Christian