@ SuppressWarnings ( "unchecked" ) public < T > T getProperty ( String key , Class < T > cls ) { if ( properties != null ) { if ( cls != null && cls != Object . class && cls != String . class && ! cls . isInterface ( ) && ! cls . isArray ( ) ) { // engine.getProperty("loaders", ClasspathLoader.class); key = key + "=" + cls . getName ( ) ; } Object value = properties . get ( key ) ; if ( value != null ) { if ( cls == String . class && value . getClass ( ) != String . class ) { return ( T ) value . getClass ( ) . getName ( ) ; } return ( T ) value ; } } return null ; }
Get config instantiated value .