本文整理了Java中org.jboss.weld.environment.se.Weld.addPackages()
方法的一些代码示例,展示了Weld.addPackages()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Weld.addPackages()
方法的具体详情如下:
包路径:org.jboss.weld.environment.se.Weld
类名称:Weld
方法名:addPackages
[英]Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.
[中]指定类的包将被扫描,找到的类将被添加到合成bean归档的bean类集中。
代码示例来源:origin: weld/core
@Override
public Weld addPackages(Package... packages) {
addPackages(false, packages);
return this;
}
代码示例来源:origin: weld/core
@Override
public Weld addPackages(Class<?>... packageClasses) {
addPackages(false, packageClasses);
return this;
}
代码示例来源:origin: weld/core
@Override
public Weld addPackages(Package... packages) {
addPackages(false, packages);
return this;
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
@Override
public Weld addPackages(Package... packages) {
addPackages(false, packages);
return this;
}
代码示例来源:origin: org.jboss.weld.se/weld-se
/**
* 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;
}
代码示例来源:origin: weld/core
@Override
public Weld addPackages(Class<?>... packageClasses) {
addPackages(false, packageClasses);
return this;
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
@Override
public Weld addPackages(Class<?>... packageClasses) {
addPackages(false, packageClasses);
return this;
}
代码示例来源:origin: org.jboss.weld.se/weld-se
/**
* 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;
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
/**
* 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;
}
代码示例来源:origin: weld/core
/**
* 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;
}
代码示例来源:origin: weld/core
/**
* 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;
}
代码示例来源:origin: org.apache.camel/camel-test-cdi
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());
}
}
内容来源于网络,如有侵权,请联系作者删除!