Package com.ibm.wsspi.classloading
Interface ClassTransformer
-
public interface ClassTransformer
This interface allows a class to be transformed before it is loaded. It is intended for use by JPA but is defined here to avoid creating a dependency on any JPA packages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
transformClass(java.lang.String name, byte[] bytes, java.security.CodeSource source, java.lang.ClassLoader loader)
The following method is to be called before a class is defined.
-
-
-
Method Detail
-
transformClass
byte[] transformClass(java.lang.String name, byte[] bytes, java.security.CodeSource source, java.lang.ClassLoader loader)
The following method is to be called before a class is defined.- Parameters:
name
- Name of the class being definedbytes
- Byte code as loaded from disksource
- Code source used to define the class.loader
- Classloader to create the class from classByte.- Returns:
- The transformed byte code returned by the persistence provider. If no transformation takes place, the original classBytes is returned. All data of the returned byte[] MUST be used by the classloader to define the POJO entity class. I.e. returnClass = defineClass(name, classBytes, 0, classBytes.length, cs);
-
-