Class AnnotationMap


  • public class AnnotationMap
    extends Object
    This class retrieves the annotation map from application scope. This map was placed there by the JSFAnnotationProcessor in the Jakarta Server Faces subsystem. The class also reloads the map if needed. The reason why the map must be reloaded is because the Jakarta Server Faces Annotation classes used as the map keys are always loaded by the Jakarta Server Faces subsystem and thus always correspond to the default Jakarta Server Faces implementation. If a different Jakarta Server Faces implementation is used then the Jakarta Server Faces impl will be looking for the wrong version of the map keys. So, we replace the default implementations of the Jakarta Server Faces 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 Jakarta Server Faces implementation. And jsf-injection points to its corresponding Jakarta Server Faces impl/api slots.
    Author:
    Stan Silvert ssilvert@redhat.com (C) 2012 Red Hat Inc.