本文整理了Java中javax.enterprise.inject.spi.Interceptor.getInterceptorBindings()
方法的一些代码示例,展示了Interceptor.getInterceptorBindings()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interceptor.getInterceptorBindings()
方法的具体详情如下:
包路径:javax.enterprise.inject.spi.Interceptor
类名称:Interceptor
方法名:getInterceptorBindings
[英]Obtains the javax.interceptor.InterceptorBinding of the interceptor.
[中]获取javax。拦截器。拦截器拦截器的绑定。
代码示例来源:origin: org.jboss.weld.se/weld-se
@Override
public Set<Annotation> getInterceptorBindings() {
return delegate().getInterceptorBindings();
}
代码示例来源:origin: weld/core
@Override
public Set<Annotation> getInterceptorBindings() {
return delegate().getInterceptorBindings();
}
代码示例来源:origin: weld/core
@Override
public Set<Annotation> getInterceptorBindings() {
return delegate().getInterceptorBindings();
}
代码示例来源:origin: weld/core
@Override
public Set<Annotation> getInterceptorBindings() {
return delegate().getInterceptorBindings();
}
代码示例来源:origin: com.caucho/resin
public InterceptorEntry(Interceptor<X> interceptor)
{
_interceptor = interceptor;
for (Annotation ann : interceptor.getInterceptorBindings()) {
_bindings.add(new QualifierBinding(ann));
}
/*
if (_bindings.size() == 0)
_bindings.add(new Binding(new CurrentLiteral()));
*/
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
@Test
@SpecAssertions({ @SpecAssertion(section = BM_INTERCEPTOR_RESOLUTION, id = "a") })
public void testResolveInterceptorsReturnsOrderedList() {
List<Interceptor<?>> interceptors = getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE,
TRANSACTIONAL_LITERAL, SECURE_LITERAL);
assertEquals(interceptors.size(), 2);
assertEquals(interceptors.get(0).getInterceptorBindings().size(), 1);
assertTrue(interceptors.get(0).getInterceptorBindings().contains(SECURE_LITERAL));
assertEquals(interceptors.get(1).getInterceptorBindings().size(), 1);
assertTrue(interceptors.get(1).getInterceptorBindings().contains(TRANSACTIONAL_LITERAL));
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
@Override
public Set<Annotation> getInterceptorBindings() {
return delegate().getInterceptorBindings();
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Test
@SpecAssertions({
@SpecAssertion(section = "11.1.2", id = "b")
})
// WBRI-59
public void testInterceptorBindingTypes()
{
Interceptor<?> interceptorBean = getTransactionalInterceptor();
assert interceptorBean.getInterceptorBindings().size() == 1;
assert interceptorBean.getInterceptorBindings().contains(new AnnotationLiteral<Transactional>(){});
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
private Annotation getContainerProvidedInterceptorBinding(Annotation literal) {
List<Interceptor<?>> interceptors = getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE, literal);
assertFalse(interceptors.isEmpty());
return interceptors.get(0).getInterceptorBindings().iterator().next();
}
}
代码示例来源:origin: weld/core
private void validateInterceptor(Interceptor<?> interceptor) {
Set<Annotation> bindings = interceptor.getInterceptorBindings();
if (bindings == null) {
throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor);
}
for (Annotation annotation : bindings) {
if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) {
throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor);
}
}
}
代码示例来源:origin: weld/core
private void validateInterceptor(Interceptor<?> interceptor) {
Set<Annotation> bindings = interceptor.getInterceptorBindings();
if (bindings == null) {
throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor);
}
for (Annotation annotation : bindings) {
if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) {
throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor);
}
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
private void validateInterceptor(Interceptor<?> interceptor) {
Set<Annotation> bindings = interceptor.getInterceptorBindings();
if (bindings == null) {
throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor);
}
for (Annotation annotation : bindings) {
if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) {
throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor);
}
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se
private void validateInterceptor(Interceptor<?> interceptor) {
Set<Annotation> bindings = interceptor.getInterceptorBindings();
if (bindings == null) {
throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor);
}
for (Annotation annotation : bindings) {
if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) {
throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor);
}
}
}
代码示例来源:origin: weld/core
private void validateInterceptor(Interceptor<?> interceptor) {
Set<Annotation> bindings = interceptor.getInterceptorBindings();
if (bindings == null) {
throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor);
}
for (Annotation annotation : bindings) {
if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) {
throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor);
}
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se
@Override
protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) {
return bean.intercepts(resolvable.getInterceptionType())
&& bean.getInterceptorBindings().size() > 0
&& Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager())
&& manager.getEnabled().isInterceptorEnabled(bean.getBeanClass());
}
代码示例来源:origin: weld/core
@Override
protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) {
return bean.intercepts(resolvable.getInterceptionType())
&& Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager())
&& manager.getEnabled().isInterceptorEnabled(bean.getBeanClass());
}
代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded
@Override
protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) {
return bean.intercepts(resolvable.getInterceptionType())
&& Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager())
&& manager.getEnabled().isInterceptorEnabled(bean.getBeanClass());
}
代码示例来源:origin: weld/core
@Override
protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) {
return bean.intercepts(resolvable.getInterceptionType())
&& Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager())
&& manager.getEnabled().isInterceptorEnabled(bean.getBeanClass());
}
代码示例来源:origin: weld/core
@Override
protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) {
return bean.intercepts(resolvable.getInterceptionType())
&& Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager())
&& manager.getEnabled().isInterceptorEnabled(bean.getBeanClass());
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
@Override
protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) {
return bean.intercepts(resolvable.getInterceptionType())
&& Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager())
&& manager.getEnabled().isInterceptorEnabled(bean.getBeanClass());
}
内容来源于网络,如有侵权,请联系作者删除!