code: @SuppressWarnings("rawtypes")
  	static <D extends TypeAdapter> D generateAdapter(HashMap<Class<? extends TypeAdapter>, TypeAdapter> cache, ReentrantLock lock, Class<D> clazz) {
  		D adapter = null;
  		try {
  			lock.lock();
  			adapter = clazz.newInstance();
  			cache.put(clazz, adapter);
  		} catch (Throwable e) {
  			throw (new KriptonRuntimeException(e));
  		} finally {
  			lock.unlock();			
  		}
  		return adapter;
  	}
docs: Generate adapter.
  
  @param <D> the generic type
  @param cache the cache
  @param lock the lock
  @param clazz the clazz
  @return the d