code: @SuppressWarnings("unchecked")
    @Override
    public <T> DatumWriter<T> create(TypeToken<T> type, Schema schema) {
      try {
        Class<DatumWriter<?>> writerClass = datumWriterClasses.getUnchecked(new CacheKey(schema, type));
        return (DatumWriter<T>) writerClass.getConstructor(Schema.class, FieldAccessorFactory.class)
                                          .newInstance(schema, fieldAccessorFactory);
      } catch (Exception e) {
        throw Throwables.propagate(e);
      }
    }
docs: Creates a {@link DatumWriter} that is able to encode given data type with the given {@link Schema}.
  The instance created is thread safe and reusable.
  
  @param type Type information of the data type to be encoded.
  @param schema Schema of the data type.
  @param <T> Type of the data type.
  @return A {@link DatumWriter} instance.