}
}
private void detectAlertComponent(Object bean) throws RuntimeException {
Class<?> beanClass = this.getBeanClass(bean);
AlertComponent alertComponentAnnotation = AnnotationUtils.findAnnotation(beanClass, AlertComponent.class);
if (alertComponentAnnotation != null) {
if (bean instanceof org.xmatthew.spy2servers.core.AlertComponent) {
org.xmatthew.spy2servers.core.AlertComponent alertComponent;
alertComponent = (org.xmatthew.spy2servers.core.AlertComponent) bean;
String name = alertComponentAnnotation.name();
if (StringUtils.isNotBlank(name)) {
alertComponent.setName(name);
}
} else {
throw new RuntimeException("@AlertComponent mark class must implement " +