< T > T getBeanOrInstantiateProcessor ( final Class < ? extends T > c ) { T rv ; try { rv = this . applicationContext . getBean ( c ) ; } catch ( NoSuchBeanDefinitionException e ) { LOGGER . warn ( "Could not get processor from context, instantiating new instance instead" , e ) ; rv = ( T ) new BeanWrapperImpl ( c ) . getWrappedInstance ( ) ; } return rv ; }
This method tries to load a processor from the application context by class name .