code: private static Class getSourceClass(Type type) {
         Class sourceClass = toClass(type);
         if (Collection.class.isAssignableFrom(sourceClass)) {
             return Collection.class;
         }
         else if (Map.class.isAssignableFrom(sourceClass)) {
             return Map.class;
         }
         else {
             return sourceClass;
         }
     }
docs: Returns the source class for the specified type.
  This is either <code>Collection.class</code> or <code>Map.class</code>.
  If none of both matches the baseclass of the specified type is returned.
  @param type the type to determine the source class for
  @return the source class