From the translator: to the translation of this article I was pushed by the insult from the absence of the operator nameOf in the Java language. For the impatient - at the end of the article there is a ready implementation in source code and binaries.
One of the things that developers of libraries in Java often lack is literals of properties. In this post, I'll show you how you can creatively use the Method Reference from Java 8 to emulate the property literals using bytecode generation.
Akin to class literals (for example,
Customer.class), The property literals would ...