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
-
-
Constructor Summary
Constructors Constructor Description HibernateEntityEnhancer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.objectweb.asm.ClassVisitorapply(String className, org.objectweb.asm.ClassVisitor outputClassVisitor)byte[]enhance(String className, byte[] bytes)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
apply
public org.objectweb.asm.ClassVisitor apply(String className, org.objectweb.asm.ClassVisitor outputClassVisitor)
- Specified by:
applyin interfaceBiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>
-
enhance
public byte[] enhance(String className, byte[] bytes)
-
-