Enum Class JsonUtils.ImmutableMapTypeAdapter

java.lang.Object
java.lang.Enum<JsonUtils.ImmutableMapTypeAdapter>
net.minecraftforge.common.util.JsonUtils.ImmutableMapTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<com.google.common.collect.ImmutableMap<String,?>>, com.google.gson.JsonSerializer<com.google.common.collect.ImmutableMap<String,?>>, Serializable, Comparable<JsonUtils.ImmutableMapTypeAdapter>, Constable
Enclosing class:
JsonUtils

public static enum JsonUtils.ImmutableMapTypeAdapter extends Enum<JsonUtils.ImmutableMapTypeAdapter> implements com.google.gson.JsonDeserializer<com.google.common.collect.ImmutableMap<String,?>>, com.google.gson.JsonSerializer<com.google.common.collect.ImmutableMap<String,?>>
  • Enum Constant Details

  • Constructor Details

    • ImmutableMapTypeAdapter

      private ImmutableMapTypeAdapter()
  • Method Details

    • values

      public static JsonUtils.ImmutableMapTypeAdapter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JsonUtils.ImmutableMapTypeAdapter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • deserialize

      public com.google.common.collect.ImmutableMap<String,?> deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<com.google.common.collect.ImmutableMap<String,?>>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(com.google.common.collect.ImmutableMap<String,?> src, Type type, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<com.google.common.collect.ImmutableMap<String,?>>