public static Object runPzConverter ( final Properties classXref , final String value , final Class < ? > typeToReturn ) { final String sConverter = classXref . getProperty ( typeToReturn . getName ( ) ) ; if ( sConverter == null ) { throw new FPConvertException ( typeToReturn . getName ( ) + " is not registered in pzconvert.properties" ) ; } try { final Converter pzconverter = ( Converter ) Class . forName ( sConverter ) . newInstance ( ) ; return pzconverter . convertValue ( value ) ; } catch ( final IllegalAccessException | InstantiationException | ClassNotFoundException ex ) { throw new FPConvertException ( ex ) ; } }
Converts a String value to the appropriate Object via the correct net . sf . flatpack . converter . PZConverter implementation