@ SuppressWarnings ( "unchecked" ) @ Override public Object postProcessAfterInitialization ( Object bean , String beanName ) throws BeansException { if ( clazz . isInstance ( bean ) ) { register ( ( V ) bean ) ; } return bean ; }
If the managed bean is of the desired type add it to the registry .