< S , T > Converter < S , T > converterForClass ( String attribute , Class < S > sourceClass , Class < T > destinationClass ) { List < Converter > list = attributeConverters . get ( attribute ) ; if ( list != null ) { for ( Converter converter : list ) { if ( converter . canConvert ( sourceClass , destinationClass ) ) { return converter ; } } } return null ; }
Returns converter for specified model attribute able to convert from sourceClass to destinationClass . Returns null if no suitable converter was found .