Contents
Class LazyLateValidator<T>
java.lang.Object
com.hypixel.hytale.codec.validation.LazyLateValidator<T>
- All Implemented Interfaces:
LateValidator<T>, Validator<T>, BiConsumer<T, ValidationResults>
A
LateValidator that resolves the wrapped validator from a supplier on first use rather
than at registration time. Used to defer validator construction past class load order issues.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(T t, ValidationResults results) voidacceptLate(T t, ValidationResults results, ExtraInfo extraInfo) voidupdateSchema(SchemaContext context, Schema target) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
LazyLateValidator
- Parameters:
supplier- resolves the wrapped validator on first use. Must return a non-nullLateValidator; it is invoked without a null check.
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceBiConsumer<T, ValidationResults>- Specified by:
acceptin interfaceValidator<T>
-
acceptLate
- Specified by:
acceptLatein interfaceLateValidator<T>
-
updateSchema
- Specified by:
updateSchemain interfaceValidator<T>
-