I'm a bit new to Java, but have used .Net since it was introduced in the early 2000's. I'm still learning about how things are done in Java and I think one of those aspects is eluding me at the moment.
For context, I'm using MyBatis v3.4.6 with Spring MVC. I have a MyBatis entity with lazy-loaded associations so my class ends up being a Proxy class. I'm looking to determine the super class of that class (basically I'm looking for my actual entity class type not the proxy class type).
I used javassist.util.proxy.ProxyFactory.isProxyClass(this.getClass()) which returned false despite my class actually being a Proxy class.
I then found org.apache.ibatis.javassist.util.proxy.ProxyFactory. When calling ProxyFactory.isProxyClass() from this class, I get an appropriate true response.
Now, because I'm interested in how all this works, I looked for this class in my MyBatis repository at this version, 3.4.6. I cannot find any reference to this ProxyFactory class nor can I find a reference to the FactoryHelper class. I also noticed that these classes look to mimic the classes of the same name in the javassist.util.proxy package.
Is there some way in java to have a package (javassist) masquerade within another package (org.apache.ibatis.javassis)? What am I missing here?