title: CGLib Enhancer with anonymous class
body: <p>I'm using CGLib to proxy classes. I've hit a problem where I can not enhance anonymous classes because they don't have a default constructor.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>Enhancer enhancer = new Enhancer();
  enhancer.setCallback(new MethodInterceptor() { .... });
  enhancer.setSuperclass(type); // type is the Class I'm trying to enhance
  enhancer.create();
  </code></pre>
  
  <p>However this throws the following exception if the enhanced class is anonymous (no default constructor).</p>
  
  <pre><code>java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
  </code></pre>
  
  <p>Is there a way to go around this?</p>