private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
public static boolean isClassLoadable(String className, ResourceLoader resourceLoader) { return loadClass(className, resourceLoader) != null; }
private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
public static boolean isClassLoadable(String className, ResourceLoader resourceLoader) { return loadClass(className, resourceLoader) != null; }
private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
private static Class<?> tryLoadClass(String value, ResourceLoader resourceLoader) { Class<?> result = null; if (resourceLoader != null) { // First use the provided ResourceLoader - most probably an implementation that is aware of the module classloader result = Reflections.loadClass(value, resourceLoader); } return result == null ? Reflections.loadClass(value, WeldClassLoaderResourceLoader.INSTANCE) : result; } }
private static ProxyInstantiator newInstance(String implementation) throws InstantiationException, IllegalAccessException { if (DefaultProxyInstantiator.class.getName().equals(implementation)) { return DefaultProxyInstantiator.INSTANCE; } Class<? extends ProxyInstantiator> clazz = Reflections.loadClass(implementation, new ClassLoaderResourceLoader(ProxyInstantiator.class.getClassLoader())); if (clazz == null) { throw new WeldException("Unable to load ProxyInstantiator implementation: " + implementation); } return clazz.newInstance(); } }
private static ProxyInstantiator newInstance(String implementation) throws InstantiationException, IllegalAccessException { if (DefaultProxyInstantiator.class.getName().equals(implementation)) { return DefaultProxyInstantiator.INSTANCE; } Class<? extends ProxyInstantiator> clazz = Reflections.loadClass(implementation, new ClassLoaderResourceLoader(ProxyInstantiator.class.getClassLoader())); if (clazz == null) { throw new WeldException("Unable to load ProxyInstantiator implementation: " + implementation); } return clazz.newInstance(); } }
private static ProxyInstantiator newInstance(String implementation) throws InstantiationException, IllegalAccessException { if (DefaultProxyInstantiator.class.getName().equals(implementation)) { return DefaultProxyInstantiator.INSTANCE; } Class<? extends ProxyInstantiator> clazz = Reflections.loadClass(implementation, new ClassLoaderResourceLoader(ProxyInstantiator.class.getClassLoader())); if (clazz == null) { throw new WeldException("Unable to load ProxyInstantiator implementation: " + implementation); } return clazz.newInstance(); } }
private static ProxyInstantiator newInstance(String implementation) throws InstantiationException, IllegalAccessException { if (DefaultProxyInstantiator.class.getName().equals(implementation)) { return DefaultProxyInstantiator.INSTANCE; } Class<? extends ProxyInstantiator> clazz = Reflections.loadClass(implementation, new ClassLoaderResourceLoader(ProxyInstantiator.class.getClassLoader())); if (clazz == null) { throw new WeldException("Unable to load ProxyInstantiator implementation: " + implementation); } return clazz.newInstance(); } }
private static ProxyInstantiator newInstance(String implementation) throws InstantiationException, IllegalAccessException { if (DefaultProxyInstantiator.class.getName().equals(implementation)) { return DefaultProxyInstantiator.INSTANCE; } Class<? extends ProxyInstantiator> clazz = Reflections.loadClass(implementation, new ClassLoaderResourceLoader(ProxyInstantiator.class.getClassLoader())); if (clazz == null) { throw new WeldException("Unable to load ProxyInstantiator implementation: " + implementation); } return clazz.newInstance(); } }
private static ProxyInstantiator newInstance(String implementation) throws InstantiationException, IllegalAccessException { if (DefaultProxyInstantiator.class.getName().equals(implementation)) { return DefaultProxyInstantiator.INSTANCE; } Class<? extends ProxyInstantiator> clazz = Reflections.loadClass(implementation, new ClassLoaderResourceLoader(ProxyInstantiator.class.getClassLoader())); if (clazz == null) { throw new WeldException("Unable to load ProxyInstantiator implementation: " + implementation); } return clazz.newInstance(); } }
public ServletApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.asyncSupported = Reflections.isClassLoadable(ASYNC_LISTENER_CONTEXT_CLASS_NAME, resourceLoader); Method isAsyncStartedMethodLocal = null; Class<ServletRequest> servletRequestClass = Reflections.loadClass(SERVLET_REQUEST_CLASS_NAME, resourceLoader); if (servletRequestClass != null) { try { isAsyncStartedMethodLocal = servletRequestClass.getMethod(IS_ASYNC_STARTED_METHOD_NAME); } catch (NoSuchMethodException e) { ServletLogger.LOG.servlet2Environment(); } } isAsyncStartedMethod = isAsyncStartedMethodLocal; }
public ServletApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.asyncSupported = Reflections.isClassLoadable(ASYNC_LISTENER_CONTEXT_CLASS_NAME, resourceLoader); Method isAsyncStartedMethodLocal = null; Class<ServletRequest> servletRequestClass = Reflections.loadClass(SERVLET_REQUEST_CLASS_NAME, resourceLoader); if (servletRequestClass != null) { try { isAsyncStartedMethodLocal = servletRequestClass.getMethod(IS_ASYNC_STARTED_METHOD_NAME); } catch (NoSuchMethodException e) { ServletLogger.LOG.servlet2Environment(); } } isAsyncStartedMethod = isAsyncStartedMethodLocal; }
private boolean initCheckTypeModifiers() { Class<?> classInfoclass = Reflections.loadClass(CLASSINFO_CLASS_NAME, new ClassLoaderResourceLoader(classFileServices.getClass().getClassLoader())); if (classInfoclass != null) { try { Method setFlags = AccessController.doPrivileged(GetDeclaredMethodAction.of(classInfoclass, "setFlags", short.class)); return setFlags != null; } catch (Exception exceptionIgnored) { BootstrapLogger.LOG.usingOldJandexVersion(); return false; } } else { return true; } }
private boolean initCheckTypeModifiers() { Class<?> classInfoclass = Reflections.loadClass(CLASSINFO_CLASS_NAME, new ClassLoaderResourceLoader(classFileServices.getClass().getClassLoader())); if (classInfoclass != null) { try { Method setFlags = AccessController.doPrivileged(GetDeclaredMethodAction.of(classInfoclass, "setFlags", short.class)); return setFlags != null; } catch (Exception exceptionIgnored) { BootstrapLogger.LOG.usingOldJandexVersion(); return false; } } else { return true; } }
private boolean initCheckTypeModifiers() { Class<?> classInfoclass = Reflections.loadClass(CLASSINFO_CLASS_NAME, new ClassLoaderResourceLoader(classFileServices.getClass().getClassLoader())); if (classInfoclass != null) { try { Method setFlags = AccessController.doPrivileged(GetDeclaredMethodAction.of(classInfoclass, "setFlags", short.class)); return setFlags != null; } catch (Exception exceptionIgnored) { BootstrapLogger.LOG.usingOldJandexVersion(); return false; } } else { return true; } }