当前位置: 首页>>代码示例>>Java>>正文


Java InjectionTarget.getInjectionPoints方法代码示例

本文整理汇总了Java中javax.enterprise.inject.spi.InjectionTarget.getInjectionPoints方法的典型用法代码示例。如果您正苦于以下问题:Java InjectionTarget.getInjectionPoints方法的具体用法?Java InjectionTarget.getInjectionPoints怎么用?Java InjectionTarget.getInjectionPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.enterprise.inject.spi.InjectionTarget的用法示例。


在下文中一共展示了InjectionTarget.getInjectionPoints方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createInjectionTarget

import javax.enterprise.inject.spi.InjectionTarget; //导入方法依赖的package包/类
@Override
public InjectionTarget<T> createInjectionTarget(final Bean<T> bean) {
    final EjbInjectionTargetImpl<T> injectionTarget = new EjbInjectionTargetImpl<T>(getAnnotatedType(), createInjectionPoints(bean), getWebBeansContext());
    final InjectionTarget<T> it = getWebBeansContext().getWebBeansUtil().fireProcessInjectionTargetEvent(injectionTarget, getAnnotatedType()).getInjectionTarget();

    for (final InjectionPoint ip : it.getInjectionPoints()) {
        if (ip.getType() != UserTransaction.class) {
            continue;
        }
        if (beanContext.getTransactionType() != TransactionType.BeanManaged) {
            throw new DefinitionException("@Inject UserTransaction is only valid for BeanManaged beans");
        }
    }

    if (!EjbInjectionTargetImpl.class.isInstance(it)) {
        return new EjbInjectionTargetImpl<T>(injectionTarget, it);
    }
    return it;
}
 
开发者ID:apache,项目名称:tomee,代码行数:20,代码来源:CdiEjbBean.java

示例2: itUOE

import javax.enterprise.inject.spi.InjectionTarget; //导入方法依赖的package包/类
@Test(expected = UnsupportedOperationException.class)
public void itUOE() throws Exception {
  BeanManager bm = GuiceBeanManager.beanManager(null);
  AnnotatedType<Listener> type = bm.createAnnotatedType(Listener.class);
  InjectionTarget<Listener> injectionTarget = bm.createInjectionTarget(type);
  injectionTarget.getInjectionPoints();
}
 
开发者ID:jooby-project,项目名称:jooby,代码行数:8,代码来源:GuiceBeanManagerTest.java

示例3: processInjectionTarget

import javax.enterprise.inject.spi.InjectionTarget; //导入方法依赖的package包/类
/**
 * Collect all targets to match Mappers and Session providers dependency.
 *
 * @param <X> the generic type
 * @param event the event
 */
protected <X> void processInjectionTarget(@Observes ProcessInjectionTarget<X> event) {
  final InjectionTarget<X> it = event.getInjectionTarget();
  for (final InjectionPoint ip : it.getInjectionPoints()) {
    injectionPoints.add(ip);
  }
}
 
开发者ID:mybatis,项目名称:cdi,代码行数:13,代码来源:MybatisExtension.java

示例4: setDefaultBeanLifecycle

import javax.enterprise.inject.spi.InjectionTarget; //导入方法依赖的package包/类
/**
 * Set the ContextualLifecycle and the InjectionPoints for the AnnotatedType
 * @param type
 */
protected void setDefaultBeanLifecycle(AnnotatedType<T> type)
{
    InjectionTarget<T> injectionTarget;
    if (!type.getJavaClass().isInterface())
    {
        injectionTarget = beanManager.createInjectionTarget(type);
    }
    else
    {
        injectionTarget = new DummyInjectionTarget<T>();
    }
    this.beanLifecycle = new DelegatingContextualLifecycle<T>(injectionTarget);
    this.injectionPoints = injectionTarget.getInjectionPoints();
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:19,代码来源:BeanBuilder.java


注:本文中的javax.enterprise.inject.spi.InjectionTarget.getInjectionPoints方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。