本文整理匯總了Java中org.jboss.weld.config.ConfigurationKey類的典型用法代碼示例。如果您正苦於以下問題:Java ConfigurationKey類的具體用法?Java ConfigurationKey怎麽用?Java ConfigurationKey使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ConfigurationKey類屬於org.jboss.weld.config包,在下文中一共展示了ConfigurationKey類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CamelCdiDeployment
import org.jboss.weld.config.ConfigurationKey; //導入依賴的package包/類
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)
.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()) {
weld.addBeanClass(alternative)
.addAlternative(alternative);
}
for (Class<?> clazz : beans.classes()) {
weld.addBeanClass(clazz);
}
weld.addPackages(false, beans.packages());
}
}
示例2: createWeld
import org.jboss.weld.config.ConfigurationKey; //導入依賴的package包/類
/**
* The returned {@link Weld} instance has:
* <ul>
* <li>automatic discovery disabled</li>
* <li>concurrent deployment disabled</li>
* </ul>
*
* @return a new {@link Weld} instance suitable for testing
*/
public static Weld createWeld() {
return new Weld().disableDiscovery().property(ConfigurationKey.CONCURRENT_DEPLOYMENT.get(), false);
}
示例3: createDefaultWeld
import org.jboss.weld.config.ConfigurationKey; //導入依賴的package包/類
/**
*
* @return a default {@link Weld} builder used to configure the Weld container
*/
public static Weld createDefaultWeld() {
return new Weld().property(ConfigurationKey.CONCURRENT_DEPLOYMENT.get(), false);
}