當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfigurationKey類代碼示例

本文整理匯總了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());
    }
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:28,代碼來源:CamelCdiDeployment.java

示例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);
}
 
開發者ID:weld,項目名稱:weld-junit,代碼行數:13,代碼來源:AbstractWeldInitiator.java

示例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);
}
 
開發者ID:weld,項目名稱:weld-vertx,代碼行數:8,代碼來源:WeldVerticle.java


注:本文中的org.jboss.weld.config.ConfigurationKey類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。