|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.library.KeywordBuilder
public final class KeywordBuilder
A keyword builder -- the thawed version of a Keyword
Note that you may only supply a SyntaxChecker for a keyword, but
if you supply a validator class, the digester must also be present.
| Method Summary | |
|---|---|
Keyword |
freeze()
Build a frozen version of this builder |
KeywordBuilder |
withDigester(Digester digester)
Add a digester to this builder |
KeywordBuilder |
withIdentityDigester(NodeType first,
NodeType... other)
Set this keyword's digester to be an IdentityDigester |
KeywordBuilder |
withSimpleDigester(NodeType first,
NodeType... other)
Set this keyword's digester to be a SimpleDigester |
KeywordBuilder |
withSyntaxChecker(SyntaxChecker syntaxChecker)
Add a syntax checker to this builder |
KeywordBuilder |
withValidatorClass(Class<? extends KeywordValidator> c)
Set the validator class for this keyword |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public KeywordBuilder withSyntaxChecker(SyntaxChecker syntaxChecker)
syntaxChecker - the syntax checker
NullPointerException - syntax checker is nullpublic KeywordBuilder withDigester(Digester digester)
digester - the digester
NullPointerException - digester is null
public KeywordBuilder withIdentityDigester(NodeType first,
NodeType... other)
IdentityDigester
first - the first instance type supported by this keywordother - other instance types supported by this keyword
NullPointerException - one or more type(s) are null
public KeywordBuilder withSimpleDigester(NodeType first,
NodeType... other)
SimpleDigester
first - the first instance type supported by this keywordother - other instance types supported by this keyword
NullPointerException - one or more type(s) are nullpublic KeywordBuilder withValidatorClass(Class<? extends KeywordValidator> c)
c - the class
NullPointerException - class is null
IllegalArgumentException - failed to find an appropriate
constructorpublic Keyword freeze()
freeze in interface Thawed<Keyword>Keyword
IllegalArgumentException - no syntax checker; or a constructor has
been supplied without a digesterKeyword.Keyword(KeywordBuilder)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||