It would be nice if we could improve the way we link to both external and internal classes. We could probably write an extension that would support the form:

apiref:<reference>:[<java module:>]<java class>[]

The <reference> would be a name that resolves to either an Antora xref name or an external site.

E.g:

apiref:gradle-plugin:org.springframework.boot.gradle.tasks.bundling.BootBuildImage[]
apiref:openjdk:java.base:java.time.Duration[]

With some backend updates we could output monotype text for the small name and offer a hover tip that shows the fully qualified name.

Comment From: wilkinsona

See also https://github.com/spring-projects/spring-boot/issues/13741.