public static PricingService getPricingService ( ) { if ( pricingService == null ) { try { Class clazz = Class . forName ( PRICING_SERVICE ) ; pricingService = ( PricingService ) clazz . newInstance ( ) ; } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException e ) { LOGGER . warn ( "Cannot instanciate util: {}" , e . getMessage ( ) ) ; throw new IllegalStateException ( e ) ; } } return pricingService ; }
Retrieve PricingService implementation