if (servletContainerInitializerClassName != null) {
try {
servletContainerInitializerClass = context.getLoader().getClassLoader()
.loadClass(servletContainerInitializerClassName);
if (servletContainerInitializerClass.isAnnotationPresent(HandlesTypes.class)) {
HandlesTypes handlesTypes = servletContainerInitializerClass.getAnnotation(HandlesTypes.class);
typesArray = handlesTypes.value();
}
} catch (Throwable t) {
log.warn(sm.getString("contextConfig.servletContainerInitializer", file.getName()), t);
return;
}
}
// Add in jarService map, and add in the local map used to speed up lookups
ServletContainerInitializerInfo jarServletContainerInitializerService =
new ServletContainerInitializerInfo(servletContainerInitializerClass, handlesTypesArray);
servletContainerInitializerInfos.put(file.getName(), jarServletContainerInitializerService);
if (typesArray != null) {
ArrayList<Class<?>> handlesTypesList = new ArrayList<Class<?>>();
if (handlesTypesArray != null) {
for (int i = 0; i < handlesTypesArray.length; i++) {
handlesTypesList.add(handlesTypesArray[i]);
}
}
for (int i = 0; i < typesArray.length; i++) {
handlesTypesList.add(typesArray[i]);
handlesTypes.put(typesArray[i], jarServletContainerInitializerService);
}
handlesTypesArray = handlesTypesList.toArray(handlesTypesArray);
}
}
}