On Sun, 23 Nov 2025 21:05:19 GMT, Vladimir Yaroslavskiy <[email protected]> wrote:
> > Could the duplication be reasonably reduced by using code templates like > > the ones in Vector API > > https://github.com/search?q=repo%3Aopenjdk%2Fjdk+path%3A*.java.template+path%3Asrc%2Fjdk.incubator.vector&type=code > > ? > > Hi [tarsa](https://github.com/tarsa), Thank you for your advice, it should > really help to easier support and modify the sorting class. Could you please > point to the documentation related to templates? For example, if I use t y p > e in code, how can I specify that t y p e is one of int, long, float, double > only? How can I generate sources from the template? it seems that the templates are based on [build.tools.spp.Spp](https://github.com/openjdk/jdk/blob/master/make/jdk/src/classes/build/tools/spp/Spp.java) tool. usage examples can be found on: https://github.com/search?q=repo%3Aopenjdk%2Fjdk+%22spp.Spp%22&type=code ------------- PR Comment: https://git.openjdk.org/jdk/pull/27411#issuecomment-3568481841
