JDK-8365667 : Template-Framework: add explicit way to get all dataNames and structuralNames
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-08-18
  • Updated: 2025-08-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
We did want to force the Template Framework user to specify a type when using dataNames. The motivation here was that someone might think they have a limited universe of types, and that they don't need to specify types because in their universe the types are limited and all sampling/toList code can handle everything from the universe. But what happens once you start mixing these universes? Then you will have to go and fix all cases where the two universes are not compatible, and insert filtering.

So now you have to always specify a type via "subtypeOf", "supertypeOf" or "exactOf".

There could be cases where you are really ok getting EVERYTHING, and opt-in to it explicitly. You are ok if you will later be blamed if you forgot to handle a case.

We can add a "allTypes" to disable the current exception, and proceed with getting dataNames and structuralNames from all types.

Important is that this is well tested, see:
test/hotspot/jtreg/testlibrary_tests/template_framework/tests/TestTemplate.java
Comments
If you are interested in this task, please just contact me :)
18-08-2025