When using Interception API with Guice, the enhanced classes by Guice follow a specific pattern which is controlled/generated by Enhancer or AbstractGlueGenerator. The naming pattern includes the hashCode(). The design choice is understandable.
However, there're use cases where the Class.getName() is distorted by the naming pattern. For example, consider a continuous profiling that runs on an application. In every instance of JVM, the class names are generated with a different hashCode(). Maybe there's a way to always ensure a consistent hashCode() but that also depends on the JVM.
In this use case, since the name of the classes are different per JVM instance, the collected profiling data appear as if they're collected from different object types; though the underlying object is all the same.
For example, if MyService is intercepted, then it appears in the profiling data as both MyService$$EnhancedByGuice$$111 and MyService$$EnhancedByGuice$$222. They are both the same type but intercepted in different JVM instances or the same JVM at different times.
I am looking for a way to extend/configure/plug a way into how Guice generates the proxyName -- link