Module eclipselink

Class StaticWeaveClassTransformer


  • public class StaticWeaveClassTransformer
    extends Object

    Description: This class provides the implementation of class transformer by leveraging on the following existing APIs,

    • PersistenceUnitProcessor.processORMetadata() - get class descriptor.
    • PersistenceUnitProcessor.buildEntityList() - get entity classes lsit.
    • TransformerFactory.createTransformerAndModifyProject - get class transformer.

    Responsibilities:

    • Create the classtransformer for each persistence unit individually and store them into the list.
    • Provide class transfom method to perform weaving function.
    • Method Detail

      • transform

        public byte[] transform​(String originalClassName,
                                Class<?> originalClass,
                                byte[] originalClassBytes)
                         throws jakarta.persistence.spi.TransformerException
        The method performs weaving function on the given class.
        Returns:
        the converted(woven) class
        Throws:
        jakarta.persistence.spi.TransformerException