by layer8 · 11mo ago · 0 comments
Meaning, instead of having to instrument each enum class, you could have
MyEnumHelper.of(AnyEnum.class)
.whateverFunctionalityYouWant()
where the of() implementation uses ClassValue to store the cached data.The high value of your response, to me, is discovering I can replace my custom "Memoizer" mechanism with a platform-provided (and therefore superior to my custom code) solution with java.lang.ClassValue.
Tysvm for posting, and in detail.