protected ClassLoader getProxyClassLoader(Class<?> beanClass) { return webBeansContext.getApplicationBoundaryService().getBoundaryClassLoader(beanClass); }
@Override protected AnnotatedConstructor<T> createConstructor() { // create proxy subclass Class<T> classToProxy = annotatedType.getJavaClass(); ClassLoader classLoader = webBeansContext.getApplicationBoundaryService().getBoundaryClassLoader(classToProxy); if (classLoader == null) { classLoader = Thread.currentThread().getContextClassLoader(); } proxySubClass = webBeansContext.getSubclassProxyFactory().createImplementedSubclass(classLoader, annotatedType); Constructor<T> ct = (Constructor<T>) webBeansContext.getSecurityService().doPrivilegedGetDeclaredConstructors(proxySubClass)[0]; Constructor<T> parentCtor; try { parentCtor = classToProxy.getConstructor(ct.getParameterTypes()); } catch (NoSuchMethodException e) { throw new IllegalStateException(e); } return new SubClassAnnotatedConstructorImpl<T>(webBeansContext, parentCtor, ct, annotatedType); }
ClassLoader classLoader = webBeansContext.getApplicationBoundaryService().getBoundaryClassLoader(annotatedType.getJavaClass());