https://openjdk.org/jeps/8312611
StableValues look pretty promising, I do wish it becomes a language construct instead of a library addition in the JEPs later down the road, though
https://openjdk.org/jeps/8312611