Package com.hypixel.hytale.codec.builder
Class BuilderField<Type,FieldType>
java.lang.Object
com.hypixel.hytale.codec.builder.BuilderField<Type,FieldType>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final KeyedCodec<FieldType> protected final Stringprotected final BiFunction<Type, ExtraInfo, FieldType> protected final TriConsumer<Type, Type, ExtraInfo> protected final booleanprotected final intprotected final intprotected final NonNullValidator<? super FieldType> protected final TriConsumer<Type, FieldType, ExtraInfo> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilderField(BuilderField.FieldBuilder<Type, FieldType, ?> builder) protectedBuilderField(KeyedCodec<FieldType> codec, TriConsumer<Type, FieldType, ExtraInfo> setter, BiFunction<Type, ExtraInfo, FieldType> getter, TriConsumer<Type, Type, ExtraInfo> inherit) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddecodeAndInherit(org.bson.BsonDocument document, Type t, Type parent, ExtraInfo extraInfo) voiddecodeAndInheritJson(RawJsonReader reader, Type t, Type parent, ExtraInfo extraInfo) voiddecodeJson(RawJsonReader reader, Type t, ExtraInfo extraInfo) voidgetCodec()intintintbooleanvoidvoidnullValidate(Type t, ValidationResults results, ExtraInfo extraInfo) voidbooleansupportsVersion(int version) toString()voidupdateSchema(SchemaContext context, Schema target) voidvoidvalidateDefaults(Type t, ExtraInfo extraInfo, Set<Codec<?>> tested) private void
-
Field Details
-
codec
-
setter
-
getter
-
inherit
-
validators
-
metadata
-
minVersion
protected final int minVersion -
maxVersion
protected final int maxVersion -
documentation
-
nonNullValidator
-
isPrimitive
protected final boolean isPrimitive
-
-
Constructor Details
-
BuilderField
-
BuilderField
protected BuilderField(@Nonnull KeyedCodec<FieldType> codec, TriConsumer<Type, FieldType, ExtraInfo> setter, BiFunction<Type, ExtraInfo, FieldType> getter, TriConsumer<Type, Type, ExtraInfo> inherit)
-
-
Method Details
-
getCodec
-
getMinVersion
public int getMinVersion() -
getMaxVersion
public int getMaxVersion() -
getHighestSupportedVersion
public int getHighestSupportedVersion() -
supportsVersion
public boolean supportsVersion(int version) -
getValidators
-
hasNonNullValidator
public boolean hasNonNullValidator() -
getDocumentation
-
decode
-
decodeAndInherit
-
encode
-
inherit
-
decodeJson
public void decodeJson(@Nonnull RawJsonReader reader, Type t, @Nonnull ExtraInfo extraInfo) throws IOException - Throws:
IOException
-
decodeAndInheritJson
public void decodeAndInheritJson(@Nonnull RawJsonReader reader, Type t, @Nullable Type parent, @Nonnull ExtraInfo extraInfo) throws IOException - Throws:
IOException
-
setValue
-
validate
-
validateDefaults
-
validateValue
-
nullValidate
-
updateSchema
-
toString
-