public abstract class BaseSingleSchemaValidatorFactory extends Object implements ValidatorFactory
Constructor and Description |
---|
BaseSingleSchemaValidatorFactory() |
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 parent)
This method consume the schema eventually creating a new
Validator . |
protected abstract String |
getKeyword() |
protected abstract BaseSingleSchemaValidator |
instantiate(MutableStateValidator parent) |
public Validator createValidator(JsonObject schema, JsonPointer scope, SchemaParserInternal parser, MutableStateValidator parent)
ValidatorFactory
Validator
. 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 ValidatorFactory
schema
- JsonObject representing the schemascope
- scope of the parsed schemaparser
- caller parserparent
- parent of this schemapublic boolean canConsumeSchema(JsonObject schema)
ValidatorFactory
Validator
canConsumeSchema
in interface ValidatorFactory
protected abstract BaseSingleSchemaValidator instantiate(MutableStateValidator parent)
protected abstract String getKeyword()
Copyright © 2023 Eclipse. All rights reserved.