I did it!
The JSON-LD algorithm spec was clearly written with something dynamically typed like JavaScript in mind. Implementing that in Java is pain in the ass and takes extreme amounts of instanceof statements to get right.
But at least I now support those "reverse" properties no one's ever gonna use...
Yeah, and an "optional parameter" to a method isn't a thing in Java.
There's one redeeming quality to these algorithms: they don't need maintenance. You only have to write that code once, test it thoroughly and forget about it forever.