Depends what you mean by enhance.
customize the enhancer:
You can write a custom bytecode enhancer using these APIs
http://anonsvn.jboss.org/repos/hibernat ... intercept/If it's proxy enhancement, then yes we have an API to write your own proxy generator
http://anonsvn.jboss.org/repos/hibernat ... ate/proxy/But nobody use these APIs aside the Hibernate team.
execute bytecode enhancement:
We usually discourage that but you can bytecode enhance your class to provide lazy basic properties.
http://docs.jboss.org/hibernate/core/3. ... propertiesThere is an ant task
In Java EE, you can also use
hibernate.ejb.use_class_enhancer = true and we will enhance classes at EMF creation time
choose between cglib or javassist for enhancer:
use hibernate.bytecode.provider, it's a system level property.