Interface SimpleValidator<T>
-
- Type Parameters:
T- The type of node that will be validated.
- All Known Implementing Classes:
AnyTypeValidator,ArrayTypeValidator,BooleanTypeValidator,DivisibleByHelper,EnumHelper,FormatHelper,IntegerTypeValidator,MaximumHelper,MinimumHelper,NullTypeValidator,NumberTypeValidator,ObjectTypeValidator,ReferenceTypeValidator,StringTypeValidator,UnionTypeValidator,Validator
public interface SimpleValidator<T>SimpleValidator is a base interface for all validator implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidvalidate(T node, JsonPointer at, ErrorHandler handler)Validates thenodevalue against the embedded schema object.
-
-
-
Method Detail
-
validate
void validate(T node, JsonPointer at, ErrorHandler handler) throws SchemaException
Validates thenodevalue against the embedded schema object.The selected error handler defines the behaviour of the validator. The
FailFastErrorHandlerthrows exception at firs violation. Other customisedErrorHandlercan collect all exceptions and after the validation the examination of thehandlercontains the final result.- Parameters:
node- value to validateat- JSONPath of the node. null means it's the root nodehandler- customised error handler likeFailFastErrorHandler- Throws:
SchemaException- when thenodeviolates with the schema
-
-