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
Modifier and TypeFieldDescriptionprotected Map
<String, ClassDetails> Class name in JVM '/' format toClassDetails
map. -
Constructor Summary
ConstructorDescriptionPersistenceWeaver
(Map<String, ClassDetails> classDetailsMap) INTERNAL: Creates an instance of dynamic byte code weaver. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
INTERNAL: Allow the weaver to be clear to release its referenced memory.INTERNAL: Get Class name in JVM '/' format toClassDetails
map.protected static String
getShortName
(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 toClassDetails
map.
-
-
Constructor Details
-
PersistenceWeaver
INTERNAL: Creates an instance of dynamic byte code weaver.- Parameters:
classDetailsMap
- Class name toClassDetails
map.- 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 toClassDetails
map.- Returns:
- Class name in JVM '/' format to
ClassDetails
map.
-
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:
transform
in interfaceClassTransformer
- Parameters:
loader
- The defining loader of the class to be transformed, may benull
if 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
null
if 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.
-