title: What is a GenericTypeResolver and how it works?
body: <p>I am working to create .NET porting of an open source Java project.</p>
  
  <p>Since I am not a java expert, some times I encounter some code that I can't understand:</p>
  
  <pre><code> private UserAgentAnnotationMapper&lt;T&gt; mapper = null;
   public void initialize(UserAgentAnnotationMapper&lt;T&gt; theMapper) {
          mapper = theMapper;
  
          Class[] classOfTArray = GenericTypeResolver.resolveTypeArguments(mapper.getClass(), UserAgentAnnotationMapper.class);
  </code></pre>
  
  <p>As I read on spring documentation:</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>public abstract class GenericTypeResolver extends java.lang.Object
  </code></pre>
  
  <blockquote>
    <p>Helper class for resolving generic types against type variables. </p>
    
    <p>Mainly intended for usage within the framework, resolving method
    parameter types even when they are declared generically</p>
  </blockquote>
  
  <p>But I can't understand: UserAgentAnnotationMapper is a generic interface, in what sense resolves generic typed against type variables?</p>
  
  <p>As I see the code returns an array of classes that I don't understand how they are correlated to the interface.</p>