This interface provide a way to override myfaces annotation scanning algorithm that needs to be found at startup:
- {@link javax.faces.bean.ManagedBean}
- {@link javax.faces.component.FacesComponent}
- {@link javax.faces.component.behavior.FacesBehavior}
- {@link javax.faces.convert.FacesConverter}
- {@link javax.faces.event.NamedEvent}
- {@link javax.faces.render.FacesRenderer}
- {@link javax.faces.render.FacesBehaviorRenderer}
- {@link javax.faces.validator.FacesValidator}
This is provided to allow application containers solve the following points
- It is common application containers to have its own protocols to handle files. It is not the same to scan annotation inside a jar than look on a directory.
- If the application container has some optimization related to annotation scanning or it already did that task, it is better to reuse that information instead do the same thing twice.
To override this class, create a file on a jar file with the following entry name: /META-INF/services/org.apache.myfaces.spi.AnnotationProvider and put the desired class name of the class that will override or extend the default AnnotationProvider.
To wrap the default AnnotationProvider, use a constructor like CustomAnnotationProvider(AnnotationProvider ap)
@since 2.0.2
@author Leonardo Uribe