java - How to know original class name if wrapped into proxy by Spring? -


i trying obtain classes name getclass().getsimplename() under spring , returns

myclass$$enhancerbyspringcglib$$somehex 

this because spring wraps class proxy.

is there portable way obtain original class name?

spring provides utility this.

http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/classutils.html#getuserclass-java.lang.class-

public static class<?> getuserclass(class<?> clazz) 

"return user-defined class given class: given class, original class in case of cglib-generated subclass."


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -