@Override public Weld addPackages(Package... packages) { addPackages(false, packages); return this; }
@Override public Weld addPackages(Class<?>... packageClasses) { addPackages(false, packageClasses); return this; }
@Override public Weld addPackages(Package... packages) { addPackages(false, packages); return this; }
@Override public Weld addPackages(Package... packages) { addPackages(false, packages); return this; }
/** * Provided Packages will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive. * * @param packages Packages to be scanned * @return self */ public Weld addPackages(Package... packages){ addPackages(false, packages); return this; }
@Override public Weld addPackages(Class<?>... packageClasses) { addPackages(false, packageClasses); return this; }
@Override public Weld addPackages(Class<?>... packageClasses) { addPackages(false, packageClasses); return this; }
/** * All classes from the packages of the specified classes will be added to the set of bean classes for the synthetic bean archive. * * <p> * Note that the scanning possibilities are limited. Therefore, only directories and jar files from the filesystem are supported. * </p> * * <p> * Scanning may also have negative impact on bootstrap performance. * </p> * * @param classes * @return self */ public Weld packages(Class<?>... packageClasses) { packages.clear(); addPackages(false, packageClasses); return this; }
/** * All classes from the packages of the specified classes will be added to the set of bean classes for the synthetic bean archive. * * <p> * Note that the scanning possibilities are limited. Therefore, only directories and jar files from the filesystem are supported. * </p> * * <p> * Scanning may also have negative impact on bootstrap performance. * </p> * * @param classes * @return self */ public Weld packages(Class<?>... packageClasses) { packages.clear(); addPackages(false, packageClasses); return this; }
/** * All classes from the packages of the specified classes will be added to the set of bean classes for the synthetic bean archive. * * <p> * Note that the scanning possibilities are limited. Therefore, only directories and jar files from the filesystem are supported. * </p> * * <p> * Scanning may also have negative impact on bootstrap performance. * </p> * * @param classes * @return self */ public Weld packages(Class<?>... packageClasses) { packages.clear(); addPackages(false, packageClasses); return this; }
/** * All classes from the packages of the specified classes will be added to the set of bean classes for the synthetic bean archive. * * <p> * Note that the scanning possibilities are limited. Therefore, only directories and jar files from the filesystem are supported. * </p> * * <p> * Scanning may also have negative impact on bootstrap performance. * </p> * * @param classes * @return self */ public Weld packages(Class<?>... packageClasses) { packages.clear(); addPackages(false, packageClasses); return this; }
CamelCdiDeployment(TestClass test, CamelCdiContext context) { this.context = context; weld = new Weld() // TODO: check parallel execution .containerId("camel-context-cdi") .property(ConfigurationKey.RELAXED_CONSTRUCTION.get(), true) .property(Weld.SHUTDOWN_HOOK_SYSTEM_PROPERTY, false) .enableDiscovery() .beanClasses(test.getJavaClass().getDeclaredClasses()) .addBeanClass(test.getJavaClass()) .addExtension(new CdiCamelExtension()); // Apply deployment customization provided by the @Beans annotation // if present on the test class if (test.getJavaClass().isAnnotationPresent(Beans.class)) { Beans beans = test.getJavaClass().getAnnotation(Beans.class); weld.addExtension(new CamelCdiTestExtension(beans)); for (Class<?> alternative : beans.alternatives()) { // It is not necessary to add the alternative class with WELD-2218 // anymore, though it's kept for previous versions weld.addBeanClass(alternative) .addAlternative(alternative); } for (Class<?> clazz : beans.classes()) { weld.addBeanClass(clazz); } weld.addPackages(false, beans.packages()); } }