Package com.hypixel.hytale.codec.lookup
Class AMapProvidedMapCodec<K,V,P,M extends Map<K,V>>
java.lang.Object
com.hypixel.hytale.codec.lookup.AMapProvidedMapCodec<K,V,P,M>
- All Implemented Interfaces:
Codec<M>,RawJsonCodec<M>,SchemaConvertable<M>,ValidatableCodec<M>
- Direct Known Subclasses:
MapProvidedMapCodec
public abstract class AMapProvidedMapCodec<K,V,P,M extends Map<K,V>>
extends Object
implements Codec<M>, ValidatableCodec<M>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanFields inherited from interface com.hypixel.hytale.codec.Codec
BASE64_PATTERN, BOOLEAN, BSON_DOCUMENT, BYTE, BYTE_ARRAY, DOUBLE, DOUBLE_ARRAY, DURATION, DURATION_SECONDS, FLOAT, FLOAT_ARRAY, INSTANT, INT_ARRAY, INTEGER, LOG_LEVEL, LONG, LONG_ARRAY, PATH, SHORT, STRING, STRING_ARRAY, UUID_BINARY, UUID_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract MdecodeJson(RawJsonReader reader, ExtraInfo extraInfo) protected abstract MemptyMap()org.bson.BsonValueprotected voidencodeExtra(org.bson.BsonDocument document, M map, ExtraInfo extraInfo) getCodecFor(K key) protected abstract StringgetIdForKey(K var1) protected abstract KgetKeyForId(String var1) voidhandleUnknown(M map, String key, RawJsonReader reader, ExtraInfo extraInfo) voidhandleUnknown(M map, String key, org.bson.BsonValue value, ExtraInfo extraInfo) toSchema(SchemaContext context) protected abstract MunmodifiableMap(M var1) voidvoidvalidateDefaults(ExtraInfo extraInfo, Set<Codec<?>> tested) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.codec.RawJsonCodec
decodeJsonMethods inherited from interface com.hypixel.hytale.codec.schema.SchemaConvertable
toSchema
-
Field Details
-
codecProvider
-
mapper
-
unmodifiable
protected final boolean unmodifiable
-
-
Constructor Details
-
AMapProvidedMapCodec
-
AMapProvidedMapCodec
-
-
Method Details
-
createMap
-
handleUnknown
-
handleUnknown
public void handleUnknown(M map, @Nonnull String key, @Nonnull RawJsonReader reader, @Nonnull ExtraInfo extraInfo) throws IOException - Throws:
IOException
-
decode
-
encode
-
encodeExtra
-
decodeJson
- Specified by:
decodeJsonin interfaceCodec<K>- Specified by:
decodeJsonin interfaceRawJsonCodec<K>- Throws:
IOException
-
toSchema
- Specified by:
toSchemain interfaceSchemaConvertable<K>
-
validate
- Specified by:
validatein interfaceValidatableCodec<K>
-
validateDefaults
- Specified by:
validateDefaultsin interfaceValidatableCodec<K>
-
getCodecFor
-
getIdForKey
-
getKeyForId
-
emptyMap
-
unmodifiableMap
-