However, a new anonymous inner class will be created during compile time (e.g. MethodNameTest$1.class). So this will create a .class file for each method that deploys this trick.
Advantage of trick is that getEncosingMethod()
It returns java.lang.reflect.Method which can be used to retrieve all other information of the method including annotations and parameter names. This makes it possible to distinguish between specific methods with the same name (method overload).