title: How to index class type of a java.util.Collections$UnmodifiableMap?
body: <p>Well... I'm actually implementing a class to convert any object to another using a class called "Adapter". I'm mapping each pair of types SOURCE -> TARGET using a HashMap: HashMap , HashMap &lt; Class&lt; ? >, Adapter > >. Each type have your adapters. For example: String can be converted to Integer, Double and so on. To get an adapter:</p>
  
  <pre><code> Adapter adapter = map.get(String.class).get(Integer.class);
  </code></pre>
  
  <p>I will get the adapters dinamically:</p>
  
  <pre><code> Adapter adapter = map.get(&lt; source_object &gt;.getClass()).get(Integer.class);
  </code></pre>
  
  <p>My problem is that I need put in that HashMap a key to java.util.Collections$UnmodifiableMap. The Request parameter collection from Servlets is a map. But, when I use .getClass() returns java.util.Collections$UnmodifiableMap. Is impossible to put a key java.util.Collections$UnmodifiableMap.class on the adapters HashMap :( </p>
  
  <p>Someone can help me? </p>