Class HibernateEntityEnhancer

java.lang.Object
io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer
All Implemented Interfaces:
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>

public final class HibernateEntityEnhancer extends Object implements BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>
Used to transform bytecode by registering to io.quarkus.deployment.ProcessorContext#addByteCodeTransformer(java.util.function.Function). This function adapts the Quarkus bytecode transformer API - which uses ASM - to use the Entity Enhancement API of Hibernate ORM, which exposes a simple byte array. N.B. For enhancement the hardcoded tool of choice is the Byte Buddy based enhancer. This is not configurable, and we enforce the ORM environment to use the "noop" enhancer as we require all entities to be enhanced at build time.
Author:
Sanne Grinovero <sanne@hibernate.org>
  • Constructor Details

    • HibernateEntityEnhancer

      public HibernateEntityEnhancer()
  • Method Details

    • apply

      public org.objectweb.asm.ClassVisitor apply(String className, org.objectweb.asm.ClassVisitor outputClassVisitor)
      Specified by:
      apply in interface BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>
    • enhance

      public byte[] enhance(String className, byte[] bytes)