The example Erik cited installs an XQuery transform. It's name is html2xthml.xqy -- it's packaged somewhere in the distribution. The example has one method for installing the transform and then an example of how to invoke it. The invocation part is at line 126.
writeMgr.write(docId, writeHandle, transform);
Just above that you'll see how the transform is created and configured.
The idea is that you can use REST (via the Java API) to install the transform at /v1/transforms/html2xhtml and then invoke it during a document PUT (using this java write method) with the transform name as parameter.
So the reference you're looking for is in the XQuery transform, not the Java source file.