Package org.apache.openjpa.enhance
Class ClassRedefiner
- java.lang.Object
- 
- org.apache.openjpa.enhance.ClassRedefiner
 
- 
 public class ClassRedefiner extends java.lang.ObjectRedefines the method bodies of existing classes. Supports Java 5 VMs that have a java agent installed on the command line as well as newer VMs without any-javaagentflag.- Since:
- 1.0.0
 
- 
- 
Constructor SummaryConstructors Constructor Description ClassRedefiner()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancanRedefineClasses(Log log)static voidredefineClasses(OpenJPAConfiguration conf, java.util.Map<java.lang.Class<?>,byte[]> classes)For each element inclasses, this method will redefine all the element's methods such that field accesses are intercepted in-line.
 
- 
- 
- 
Method Detail- 
redefineClassespublic static void redefineClasses(OpenJPAConfiguration conf, java.util.Map<java.lang.Class<?>,byte[]> classes) For each element inclasses, this method will redefine all the element's methods such that field accesses are intercepted in-line. IfcanRedefineClasses(Log)returnsfalse, this method is a no-op.
 - 
canRedefineClassespublic static boolean canRedefineClasses(Log log) - Returns:
- whether or not this VM has an instrumentation installed that
 permits redefinition of classes. This assumes that all the arguments
 will be modifiable classes according to
 Instrumentation.isModifiableClass(java.lang.Class<?>), and only checks whether or not an instrumentation is available and if retransformation is possible.
 
 
- 
 
-