Where does Java.type come from

So I noticed Java.type mendtioned here: Possible to use JJS to run Java code in Javascript?

Where does it come from?
Where is it documented?

Could not find anything here:

Are there more “undocumented” methods available?

Node comes with its own java bridge API, I’m guess I should not use it?

I would like to do something similar to:

Java.type is not an undocumented Enonic method, it is part of the core Nashorn Java API: https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html

So I’m guessing Nashorn is what Enonic XP uses then?

Yup, looks like it:
http://xp.readthedocs.io/en/stable/developer/ssjs/index.html?highlight=nashorn