Class FaultTolerantTypeAdapterFactory

java.lang.Object
org.eclipse.lemminx.settings.FaultTolerantTypeAdapterFactory
All Implemented Interfaces:
com.google.gson.TypeAdapterFactory

public class FaultTolerantTypeAdapterFactory extends Object implements com.google.gson.TypeAdapterFactory
Creates TypeAdapters that are wrapped in a try/catch statement, so if anything goes wrong when deserializing an object, it is set to null and not parsed.
  • Constructor Details

    • FaultTolerantTypeAdapterFactory

      public FaultTolerantTypeAdapterFactory()
  • Method Details

    • create

      public <T> com.google.gson.TypeAdapter<T> create(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<T> type)
      Specified by:
      create in interface com.google.gson.TypeAdapterFactory