1 22 package org.jboss.aop.microcontainer.integration; 23 24 29 public class AOPDeployedChecker 30 { 31 public static Class getClassIfExists(ClassLoader beanLoader, String className) 32 { 33 Class clazz = attemptLoadClass(beanLoader, className); 34 if (clazz != null) 35 { 36 return clazz; 37 } 38 39 ClassLoader tcl = Thread.currentThread().getContextClassLoader(); 41 return attemptLoadClass(tcl, className); 42 } 43 44 private static Class attemptLoadClass(ClassLoader loader, String className) 45 { 46 if (loader != null) 47 { 48 try 49 { 50 return loader.loadClass(className); 51 } 52 catch(ClassNotFoundException e) 53 { 54 return null; 55 } 56 } 57 return null; 58 } 59 } 60 | Popular Tags |