Refine search
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(); } }
if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) { return 0; ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader()); InputStream in = null; URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
if (!Reflections.isClassLoadable(BCEL_JAVA_CLASS_FQCN, bcelResourceLoader)) { if (!Reflections.isClassLoadable(BCEL_JAVA_CLASS_FQCN, bcelResourceLoader)) { ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader()); InputStream in = null; URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class"); Class<?> classParserClass = Reflections.loadClass(BCEL_CLASS_PARSER_FQCN, bcelResourceLoader); Class<?> javaClassClass = Reflections.loadClass(BCEL_JAVA_CLASS_FQCN, bcelResourceLoader); Class<?> methodClass = Reflections.loadClass(BCEL_METHOD_FQCN, bcelResourceLoader);
/** * Creates a new service loader for the given service type and class loader. * * @param service The interface or abstract class representing the service * @param loader The class loader to be used to load provider-configuration * files and provider classes, or null if the system class loader * (or, failing that, the bootstrap class loader) is to be used * @return A new service loader */ public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = service.getClassLoader(); } return new ServiceLoader<S>(service, new ClassLoaderResourceLoader(loader)); }
if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) { return 0; ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader()); InputStream in = null; URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
/** * Creates a new service loader for the given service type and class loader. * * @param service The interface or abstract class representing the service * @param loader The class loader to be used to load provider-configuration * files and provider classes, or null if the system class loader * (or, failing that, the bootstrap class loader) is to be used * @return A new service loader */ public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = service.getClassLoader(); } return new ServiceLoader<S>(service, new ClassLoaderResourceLoader(loader)); }
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(); } }
if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) { return 0; ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader()); InputStream in = null; URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
/** * Creates a new service loader for the given service type and class loader. * * @param service The interface or abstract class representing the service * @param loader The class loader to be used to load provider-configuration * files and provider classes, or null if the system class loader * (or, failing that, the bootstrap class loader) is to be used * @return A new service loader */ public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = service.getClassLoader(); } return new ServiceLoader<S>(service, new ClassLoaderResourceLoader(loader)); }
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(); } }
if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) { return 0; ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader()); InputStream in = null; URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
/** * Set a {@link ClassLoader}. The given {@link ClassLoader} will be scanned automatically for bean archives if scanning is enabled. * * @param classLoader * @return self */ public Weld setClassLoader(ClassLoader classLoader) { Preconditions.checkNotNull(classLoader); resourceLoader = new ClassLoaderResourceLoader(classLoader); return this; }
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(); } }
if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) { return 0; ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader()); InputStream in = null; URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
/** * Creates a new service loader for the given service type and class loader. * * @param service The interface or abstract class representing the service * @param loader The class loader to be used to load provider-configuration * files and provider classes, or null if the system class loader * (or, failing that, the bootstrap class loader) is to be used * @return A new service loader */ public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = service.getClassLoader(); } return new ServiceLoader<S>(service, new ClassLoaderResourceLoader(loader)); }
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(); } }
/** * Creates a new service loader for the given service type and class loader. * * @param service The interface or abstract class representing the service * @param loader The class loader to be used to load provider-configuration * files and provider classes, or null if the system class loader * (or, failing that, the bootstrap class loader) is to be used * @return A new service loader */ public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = service.getClassLoader(); } return new ServiceLoader<S>(service, new ClassLoaderResourceLoader(loader)); }
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(); } }
/** * Creates a new service loader for the given service type and class loader. * * @param service The interface or abstract class representing the service * @param loader The class loader to be used to load provider-configuration * files and provider classes, or null if the system class loader * (or, failing that, the bootstrap class loader) is to be used * @return A new service loader */ public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) { if (loader == null) { loader = service.getClassLoader(); } return new ServiceLoader<S>(service, new ClassLoaderResourceLoader(loader)); }
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; } }