Enum Class JsonUtils.ImmutableListTypeAdapter

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

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

  • Constructor Details

    • ImmutableListTypeAdapter

      private ImmutableListTypeAdapter()
  • Method Details

    • values

      public static JsonUtils.ImmutableListTypeAdapter[] 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.ImmutableListTypeAdapter 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.ImmutableList<?> 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.ImmutableList<?>>
      Throws:
      com.google.gson.JsonParseException
    • serialize

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