public void initializeAll ( InjectionManager injectionManager ) { if ( injectionManager != null ) { for ( Converter < ? > converter : _converters ) { Field [ ] fields = ReflectionUtils . getFields ( converter . getClass ( ) , Inject . class ) ; for ( Field field : fields ) { final Object value ; if ( field . getType ( ) == Converter . class ) { // Injected converters are used as callbacks. They // should be assigned to the outer converter, which is // this. value = this ; } else { InjectionPoint < Object > injectionPoint = new MemberInjectionPoint < Object > ( field , converter ) ; value = injectionManager . getInstance ( injectionPoint ) ; } field . setAccessible ( true ) ; try { field . set ( converter , value ) ; } catch ( Exception e ) { throw new IllegalStateException ( "Could not initialize converter: " + converter , e ) ; } } } } }
Initializes all converters contained with injections