Module org.eclipse.persistence.jpa
Class StaticWeaveClassTransformer
java.lang.Object
org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer
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.
-
Constructor Summary
ConstructorDescriptionStaticWeaveClassTransformer
(URL inputArchiveURL, ClassLoader aclassloader) Constructs an instance of StaticWeaveClassTransformer.StaticWeaveClassTransformer
(URL inputArchiveURL, String persistenceXMLLocation, ClassLoader aclassloader, Writer logWriter, int loglevel) Constructs an instance of StaticWeaveClassTransformer. -
Method Summary
-
Constructor Details
-
StaticWeaveClassTransformer
Constructs an instance of StaticWeaveClassTransformer.- Throws:
Exception
-
StaticWeaveClassTransformer
public StaticWeaveClassTransformer(URL inputArchiveURL, String persistenceXMLLocation, ClassLoader aclassloader, Writer logWriter, int loglevel) throws URISyntaxException, IOException Constructs an instance of StaticWeaveClassTransformer.- Throws:
URISyntaxException
IOException
-
-
Method Details
-
transform
public byte[] transform(String originalClassName, Class<?> originalClass, byte[] originalClassBytes) throws TransformerException The method performs weaving function on the given class.- Returns:
- the converted(woven) class
- Throws:
TransformerException
-