title: How do I implement TypeAdapterFactory in Gson?
body: <p>How do I implement type <a href="http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapterFactory.html" rel="noreferrer">TypeAdapterFactory</a> in Gson?</p>
  
  <p>The main method of create is generic. Why?</p>
  
  <p>The registration method <a href="http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/GsonBuilder.html#registerTypeAdapterFactory%28com.google.gson.TypeAdapterFactory%29" rel="noreferrer">registerTypeAdapterFactory()</a> does not receive type a type argument. So, how does <code>Gson</code> know which classes are processed by the factory?</p>
  
  <p>Should I implement one factory for multiple classes, or can I implement one for many classes?</p>
  
  <p>If I implement one factory for multiple classes, then what should I return in case of out-of-domain type argument?</p>