Set<Annotation> bindings = (Set<Annotation>) invocationContext.getContextData().get("org.jboss.weld. interceptor.bindings");
In fact, a more safe way is to use the Weld API, cast the invocation context to org.jboss.weld.interceptor.WeldInvocationContext and use the appropriate methods.
Yes. There is already a spec issue: https://issues.jboss.org/browse/CDI-468 but this would require a change in interceptors spec.
Is there a standard way to get the bindings? Perhaps getting hold of the Bean<T> that represents the current Interceptor?
You can inject a bean with scope @Dependent, qualifier @Default and type Interceptor into any interceptor instance. However, this will not help for @Nonbinding value members of an interceptor binding.
Kind regards,
Arjan Tijms
_______________________________________________
cdi-dev mailing list
cdi-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html ). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic