ContainerUtils { public static <T> boolean testAopIgnore(Class<T> targetType, ClassLoader rootLoader) { Boolean ignore = testAopIgnore(targetType, true); if (ignore != null) { return ignore; } ignore = testAopIgnore(rootLoader, targetType.getPackage().getName()); return (ignore != null) ? ignore : false; }  static Method findInitMethod(Class<?> targetBeanType, BindInfo<?> bindInfo); static Method findDestroyMethod(Class<?> targetBeanType, BindInfo<?> bindInfo); static Class<T> findImplClass(final Class<?> notSureType); static Annotation findInject(boolean injectDefault, Annotation[] annotations); static boolean isInjectConstructor(Constructor<?> constructor); static Object injSettings(AppContext appContext, InjectSettings injectSettings, Class<?> toType); static void invokeMethod(Object targetBean, Method initMethod); static void invokeField(Field field, Object targetBean, Object newValue); static boolean testAopIgnore(Class<T> targetType, ClassLoader rootLoader);  }
@Test public void testAop1() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); assert !ContainerUtils.testAopIgnore(PropertyBean.class, loader); assert !ContainerUtils.testAopIgnore(LevelFooFunction.class, loader); assert ContainerUtils.testAopIgnore(ThreadFooFunction.class, loader); assert ContainerUtils.testAopIgnore(L2FooFunction.class, loader); assert !ContainerUtils.testAopIgnore(GrandFatherBean.class, loader); assert ContainerUtils.testAopIgnore(JamesBean.class, loader); assert !ContainerUtils.testAopIgnore(JamesSonBean.class, loader); assert ContainerUtils.testAopIgnore(WilliamBean.class, loader); assert ContainerUtils.testAopIgnore(WilliamSonBean.class, loader); }