Spring: instantiate a class depending on String parameter
<p>I have a syntax similar to this in my spring application:</p>

<pre><code>public OAuthClient getOAuthClient(String clientType, ClientConfig config){
    switch (clientType) {
        case "google":
            return new GoogleOAuthClient(config);
        case "facebook":
            return new FacebookOauthClient(config);
        case "linkedIn":
            return new LinkedInOauthClient(config);
        //... more clients
        default:
            return new BasicOauthClient(config);
    }
}
</code></pre>

<p>How to manage such instantiation with Spring xml-configuration?</p>