Package net.minecraftforge.common.util
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,?>>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableMap<String,
?> deserialize
(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElement
serialize
(com.google.common.collect.ImmutableMap<String, ?> src, Type type, com.google.gson.JsonSerializationContext context) Returns the enum constant of this class with the specified name.static JsonUtils.ImmutableMapTypeAdapter[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Constructor Details
-
ImmutableMapTypeAdapter
private ImmutableMapTypeAdapter()
-
-
Method Details
-
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
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 nameNullPointerException
- 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 interfacecom.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 interfacecom.google.gson.JsonSerializer<com.google.common.collect.ImmutableMap<String,
?>>
-