{
Annotation annotation = componentFactoryClass.getAnnotations()[i];
Router routerAnnotation = annotation.annotationType().getAnnotation(Router.class);
if (routerAnnotation != null && routerAnnotation.type() == RouterType.Inbound)
{
MessageProcessorAnnotationParser parser = parserFactory.getRouterParser(annotation, componentFactoryClass, null);
if (parser != null)
{
((ServiceCompositeMessageSource) service.getMessageSource()).addMessageProcessor(parser.parseMessageProcessor(annotation));
}
else
{
//TODO i18n
throw new IllegalStateException("Cannot find parser for router annotation: " + annotation.toString());