when trying to enhance/proxy a class declared that
extends a superclass w/ generics, such as:
public abstract class A extends B<T> {....}
it throws the following exception
net.sf.cglib.core.CodeGenerationException:
java.lang.ClassCastException-->java.lang.Class
at
net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:235)
at
net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
at
net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:216)
at
net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:640)
at
net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
at
net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at
net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)