public T providerOfType ( final String providerName ) throws ExecutionServiceException { if ( null == providerName ) { throw new NullPointerException ( "provider name was null for Service: " + getName ( ) ) ; } if ( isCacheInstances ( ) ) { if ( null == instanceregistry . get ( providerName ) ) { T instance = createProviderInstanceOfType ( providerName ) ; instanceregistry . put ( providerName , instance ) ; return instance ; } return instanceregistry . get ( providerName ) ; } else { return createProviderInstanceOfType ( providerName ) ; } }
Return the provider instance of the given name .