Log log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE);
if (classes == null || classes.size() == 0 || !canRedefineClasses(log))
return;
Instrumentation inst = null;
ClassFileTransformer t = null;
try {
inst = InstrumentationFactory.getInstrumentation(log);
Class<?>[] array = classes.keySet().toArray(new Class[classes.size()]);
if (JavaVersions.VERSION >= 6) {
log.trace(_loc.get("retransform-types", classes.keySet()));
t = new ClassFileTransformer() {
public byte[] transform(ClassLoader loader, String clsName,
Class<?> classBeingRedefined, ProtectionDomain pd,
byte[] classfileBuffer) {
return classes.get(classBeingRedefined);
}