public final class Keyword extends Object
The process is as follows:
SyntaxChecker for this keyword;KeywordValidator;It is perfectly legal to register a keyword with only a syntax checker, or
only a keyword validator. An example is $schema, which must be a
valid URI (therefore it has a syntax checker) but does not play any role
in instance validation (therefore it has no keyword validator).
This class is thread safe and immutable.
Keyword.Builder,
SyntaxChecker,
KeywordValidator,
KeywordRegistry| Modifier and Type | Class and Description |
|---|---|
static class |
Keyword.Builder
Builder class for a new keyword
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
SyntaxChecker |
getSyntaxChecker() |
Class<? extends KeywordValidator> |
getValidatorClass() |
static Keyword.Builder |
withName(String name)
Create a new
Keyword.Builder for a keyword with a given name |
public static Keyword.Builder withName(String name)
Keyword.Builder for a keyword with a given namename - the namepublic String getName()
public SyntaxChecker getSyntaxChecker()
public Class<? extends KeywordValidator> getValidatorClass()
Copyright © 2013. All Rights Reserved.