classes = map.get(FacesValidator.class);
if (classes != null && !classes.isEmpty())
{
for (Class<?> clazz : classes)
{
FacesValidator val = (FacesValidator) clazz
.getAnnotation(FacesValidator.class);
if (val != null)
{
if (log.isLoggable(Level.FINEST))
{
log.finest("addValidator(" + val.value() + "," + clazz.getName()
+ ")");
}
String value = val.value();
if ( value == null ||
(value != null && value.length() <= 0))
{
String simpleName = clazz.getSimpleName();
value = Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
}
facesConfig.addValidator(value, clazz.getName());
if (val.isDefault())
{
ApplicationImpl app = null;
if (facesConfig.getApplications().isEmpty())
{
app = new ApplicationImpl();