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 void
validate(T node, JsonPointer at, ErrorHandler handler)
Validates thenode
value against the embedded schema object.
-
-
-
Method Detail
-
validate
void validate(T node, JsonPointer at, ErrorHandler handler) throws SchemaException
Validates thenode
value against the embedded schema object.The selected error handler defines the behaviour of the validator. The
FailFastErrorHandler
throws exception at firs violation. Other customisedErrorHandler
can collect all exceptions and after the validation the examination of thehandler
contains 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 thenode
violates with the schema
-
-