Class DocumentTypeAdapter

java.lang.Object
com.google.gson.TypeAdapter<Document>
eu.cloudnetservice.driver.document.gson.DocumentTypeAdapter

final class DocumentTypeAdapter extends com.google.gson.TypeAdapter<Document>
A type adapter that can serialize documents of any type into a json object and read documents into a json type.
Since:
4.0
  • Field Details

    • jsonElementTypeAdapter

      private final com.google.gson.TypeAdapter<com.google.gson.JsonElement> jsonElementTypeAdapter
  • Constructor Details

    • DocumentTypeAdapter

      public DocumentTypeAdapter(@NonNull @NonNull com.google.gson.Gson gsonInstance)
      Constructs a new instance of the document type adapter.
      Parameters:
      gsonInstance - the gson instance this type adapter instance got bound to.
      Throws:
      NullPointerException - if the given gson instance is null.
  • Method Details