code: private static Class<?> getClassForType(Type t) {
          if (t instanceof Class) {
              return (Class<?>) t;
          } else if (t instanceof ParameterizedType) {
              ParameterizedType pt = (ParameterizedType) t;
              return getClassForType(pt.getActualTypeArguments()[0]);
          } else if (t instanceof GenericArrayType) {
              throw new IllegalStateException("Data Model Error: Simple deserializer does not handle arrays, please use Collection instead.");
          }
          throw new IllegalStateException("Data Model Error: Unknown type " + t.toString() + ".");
      }
docs: A little utility to convert from Type to Class. <br>
  The method is only complete enough for the usage within this class, it won't handle [] arrays, or primitive types, etc.
  
  @param t the Type to return a Class for, if the Type is parameterized, the actual type is returned (eg, List<String> returns String)
  @return