本文整理汇总了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;
}
示例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();
}
示例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);
}
}
示例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();
}