2009-05-25 20:35:09 UTC
I've found that ClassEmitter does not preserve field annotations. I've managed to figure out why, and was wondering if there is a good workaround or fix.
On line 264 in net.sf.cglib.core.ClassEmitter, there is a TODO to return the FieldVisitor. It appears that if the FieldVisitor is not returned, the field annotations present on the class being transformed are not written. I was going to just override this functionality in my InterceptFieldTransformer, but there are too many private/package protected variables and functions to allow me to do that. Any help would be appreciated.
- Erick