public class RequiredValidatorFactory extends Object implements ValidatorFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
RequiredValidatorFactory.RequiredValidator |
| Constructor and Description |
|---|
RequiredValidatorFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConsumeSchema(JsonObject schema)
Returns true if this factory can consume the provided schema, eventually returning an instance of
Validator |
Validator |
createValidator(JsonObject schema,
JsonPointer scope,
SchemaParserInternal parser,
MutableStateValidator validator)
This method consume the schema eventually creating a new
Validator. |
public Validator createValidator(JsonObject schema, JsonPointer scope, SchemaParserInternal parser, MutableStateValidator validator)
ValidatorFactoryValidator. The schema parser calls it during schema parsing only if ValidatorFactory.canConsumeSchema(JsonObject) returns true
You can return any of SyncValidator, AsyncValidator or MutableStateValidator
createValidator in interface ValidatorFactoryschema - JsonObject representing the schemascope - scope of the parsed schemaparser - caller parservalidator - parent of this schemapublic boolean canConsumeSchema(JsonObject schema)
ValidatorFactoryValidatorcanConsumeSchema in interface ValidatorFactoryCopyright © 2021 Eclipse. All rights reserved.