ValidationMode<T> class abstract

Operation mode that provides a way to validate objects and return validation related error messages as annotations.

Implemented types
Implementers

Constructors

ValidationMode()

Properties

deriveFuture Type
no setterinherited
deriveFutureOr Type
no setterinherited
deriveIterable Type
no setterinherited
deriveList Type
no setterinherited
deriveSet Type
no setterinherited
deriveStream Type
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isNullable bool
no setterinherited
nullable TypeCapture
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeArgument Type
no setterinherited

Methods

annotate(T value, DogEngine engine) AnnotationResult
Annotates the given value and returns the result as an AnnotationResult.
castIterable(Iterable<T> iterable) Iterable<T>
inherited
castList(List list) List<T>
inherited
castSet(Set set) Set<T>
inherited
consumeType<RETURN>(RETURN func<_>()) → RETURN
inherited
consumeTypeArg<RETURN, ARG>(RETURN func<_>(ARG), ARG arg) → RETURN
inherited
initialise(DogEngine engine) → void
Initialises the operation mode with the given engine. This allows for the operation mode to possibly precache some data that would need to be lookup on every invocation otherwise.
inherited
isAssignable(dynamic object) bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(T value, DogEngine engine) bool
Validates the given value and returns true if the value is valid.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create<T, IR>({IR? initializer(DogEngine engine)?, AnnotationResult annotator(T value, DogEngine engine, IR? cached)?, required bool validator(T value, DogEngine engine, IR? cached)}) ValidationMode<T>
Creates a new ValidationMode with the given initializer, validator and annotator.