public class AnnotationMap
extends Object
This class retrieves the annotation map from application scope. This map was placed there by the JSFAnnotationProcessor
in the jsf subsystem.
The class also reloads the map if needed. The reason why the map must be reloaded is because the JSF Annotation classes used as the map keys are always
loaded by the JSF subsystem and thus always correspond to the default JSF implementation. If a different JSF
implementation is used then the JSF impl will be looking for the wrong version of the map keys. So, we replace
the default implementations of the JSF Annotation classes with whatever version the WAR is actually using.
The reason this works is because we have a "slot" for jsf-injection for each JSF implementation. And jsf-injection
points to its corresponding JSF impl/api slots.
- Author:
- Stan Silvert ssilvert@redhat.com (C) 2012 Red Hat Inc.