Class CacheMetaJsonOps

java.lang.Object
com.mojang.serialization.JsonOps
dev.lukebemish.dynamicassetgenerator.api.cache.CacheMetaJsonOps
All Implemented Interfaces:
com.mojang.serialization.DynamicOps<com.google.gson.JsonElement>, CacheMetaDynamicOps<com.google.gson.JsonElement>

public class CacheMetaJsonOps extends com.mojang.serialization.JsonOps implements CacheMetaDynamicOps<com.google.gson.JsonElement>
A CacheMetaDynamicOps that uses JsonElement as its underlying type.
  • Field Summary

    Fields inherited from class com.mojang.serialization.JsonOps

    COMPRESSED, INSTANCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <D> @Nullable D
    getData(Class<? super D> clazz)
     
    <D> void
    putData(Class<? super D> clazz, @Nullable D data)
    Attach the provided data to the provided class key in the metadata-providing context this object represents.

    Methods inherited from class com.mojang.serialization.JsonOps

    compressMaps, convertTo, createBoolean, createList, createMap, createNumeric, createString, empty, getBooleanValue, getList, getMap, getMapEntries, getMapValues, getNumberValue, getStream, getStringValue, listBuilder, mapBuilder, mergeToList, mergeToList, mergeToMap, mergeToMap, remove, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.mojang.serialization.DynamicOps

    compressMaps, convertList, convertMap, convertTo, createBoolean, createByte, createByteList, createDouble, createFloat, createInt, createIntList, createList, createLong, createLongList, createMap, createMap, createNumeric, createShort, createString, empty, emptyList, emptyMap, get, getBooleanValue, getByteBuffer, getGeneric, getIntStream, getList, getLongStream, getMap, getMapEntries, getMapValues, getNumberValue, getNumberValue, getStream, getStringValue, listBuilder, mapBuilder, mergeToList, mergeToList, mergeToMap, mergeToMap, mergeToMap, mergeToPrimitive, remove, set, update, updateGeneric, withDecoder, withEncoder, withParser
  • Constructor Details

    • CacheMetaJsonOps

      public CacheMetaJsonOps()
  • Method Details

    • getData

      public <D> @Nullable D getData(Class<? super D> clazz)
      Specified by:
      getData in interface CacheMetaDynamicOps<com.google.gson.JsonElement>
      Returns:
      data associated with the provided class, or null if there is none
    • putData

      public <D> void putData(Class<? super D> clazz, @Nullable D data)
      Description copied from interface: CacheMetaDynamicOps
      Attach the provided data to the provided class key in the metadata-providing context this object represents.
      Specified by:
      putData in interface CacheMetaDynamicOps<com.google.gson.JsonElement>
      Type Parameters:
      D - the type of data to attach
      Parameters:
      clazz - the class to use as a key
      data - the data to attach