}
if (implementedWebListenerInterface == null) {
throw new DeploymentException("One of supported web listener interface " + Arrays.toString(SUPPORTED_WEBLISTENER_INTERFACES) + " should be implemented by class " + cls.getName()
+ " while WebListener annotation is used");
}
WebListener webListener = cls.getAnnotation(WebListener.class);
if (ListenerMergeHandler.isListenerConfigured(cls.getName(), mergeContext)) {
return;
}
Listener newListener = new Listener();
if (!webListener.value().isEmpty()) {
newListener.addDescription(new Text(null, webListener.value()));
}
newListener.setListenerClass(cls.getName());
webApp.getListener().add(newListener);
//
ListenerMergeHandler.addListener(newListener, mergeContext);