Module org.eclipse.persistence.jpa
Class PersistenceWeaver
java.lang.Object
org.eclipse.persistence.internal.jpa.weaving.PersistenceWeaver
- All Implemented Interfaces:
ClassTransformer
INTERNAL:
This class performs dynamic byte code weaving: for each attribute
mapped with One To One mapping with Basic Indirection it substitutes the
original attribute's type for ValueHolderInterface.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String, ClassDetails> Class name in JVM '/' format toClassDetailsmap. -
Constructor Summary
ConstructorsConstructorDescriptionPersistenceWeaver(Map<String, ClassDetails> classDetailsMap) INTERNAL: Creates an instance of dynamic byte code weaver. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()INTERNAL: Allow the weaver to be clear to release its referenced memory.INTERNAL: Get Class name in JVM '/' format toClassDetailsmap.protected static StringgetShortName(String name) INTERNAL: Returns an unqualified class name from the specified class name.byte[]transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) INTERNAL: Perform dynamic byte code weaving of class.
-
Field Details
-
classDetailsMap
Class name in JVM '/' format toClassDetailsmap.
-
-
Constructor Details
-
PersistenceWeaver
INTERNAL: Creates an instance of dynamic byte code weaver.- Parameters:
classDetailsMap- Class name toClassDetailsmap.- Since:
- 2.7
-
-
Method Details
-
clear
public void clear()INTERNAL: Allow the weaver to be clear to release its referenced memory. This is required because the class loader reference to the transformer will never gc. -
getClassDetailsMap
INTERNAL: Get Class name in JVM '/' format toClassDetailsmap.- Returns:
- Class name in JVM '/' format to
ClassDetailsmap.
-
transform
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws TransformerException INTERNAL: Perform dynamic byte code weaving of class.- Specified by:
transformin interfaceClassTransformer- Parameters:
loader- The defining loader of the class to be transformed, may benullif the bootstrap loader.className- The name of the class in the internal form of fully qualified class and interface names.classBeingRedefined- If this is a redefine, the class being redefined, otherwisenull.protectionDomain- The protection domain of the class being defined or redefined.classfileBuffer- The input byte buffer in class file format (must not be modified).- Returns:
- A well-formed class file buffer (the result of the transform), or
nullif no transform is performed. - Throws:
TransformerException
-
getShortName
INTERNAL: Returns an unqualified class name from the specified class name.- Parameters:
name- Class name with'/'as delimiter.- Returns:
- Unqualified class name.
-