Looking at the source of Asciidoctor [1] I would say that the context of the node has to be anchor and the node type should be :xref
That would result in:
Map<Object,Object> options = new HashMap<>();
options.put(":type", ":xref");
return createPhraseNode(parent, ":anchor", texttoshow, new HashMap<>, options);
But that's just guessing, I didn't test it.
[1]
https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/converter/html5.rb#L1021-L1023