1 22 package org.jboss.aop.hook; 23 24 import org.jboss.aop.AspectManager; 25 26 import com.bea.jvm.ClassLibrary; 27 import com.bea.jvm.ClassPreProcessor; 28 import com.bea.jvm.JVMFactory; 29 30 public class JRockitClassPreProcessor implements ClassPreProcessor{ 31 32 public JRockitClassPreProcessor() 33 { 34 ClassLibrary lib = JVMFactory.getJVM().getClassLibrary(); 35 lib.setClassPreProcessor(this); 36 } 37 38 public byte[] preProcess(ClassLoader loader, String classname, byte[] bytes) 39 { 40 classname = classname.replace('/', '.'); 41 if (JDK14TransformerManager.isNonAdvisableClassName(classname)) 43 { 44 return bytes; 45 } 46 48 try 49 { 50 return AspectManager.instance().translate(classname, loader, bytes); 51 } 52 catch (Exception e) 53 { 54 throw new RuntimeException (e); 55 } 56 57 } 58 59 } 60 | Popular Tags |