@ SuppressWarnings ( "unchecked" ) public < T extends AbstractModuleConfig > T getModuleConfig ( ConfigProvider < T > provider ) throws ConfigurationParseException { Class < T > moduleClass = provider . getType ( ) ; if ( configCache . containsKey ( moduleClass ) ) return ( T ) configCache . get ( moduleClass ) ; synchronized ( this ) { if ( configCache . containsKey ( moduleClass ) ) { return ( T ) configCache . get ( moduleClass ) ; } T config = configurationJsonParser . parseJSONPNCConfig ( CONFIG_STRING , provider ) ; configCache . put ( moduleClass , config ) ; return config ; } }
Reads configuration for module