public final class KeywordBuilder extends java.lang.Object implements Thawed<Keyword>
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.
Modifier and Type | Method and Description |
---|---|
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(java.lang.Class<? extends KeywordValidator> c)
Set the validator class for this keyword
|
KeywordBuilder |
withValidatorFactory(KeywordValidatorFactory factory)
Set the validator factory for this keyword
|
public KeywordBuilder withSyntaxChecker(SyntaxChecker syntaxChecker)
syntaxChecker
- the syntax checkerjava.lang.NullPointerException
- syntax checker is nullpublic KeywordBuilder withDigester(Digester digester)
digester
- the digesterjava.lang.NullPointerException
- digester is nullpublic KeywordBuilder withIdentityDigester(NodeType first, NodeType... other)
IdentityDigester
first
- the first instance type supported by this keywordother
- other instance types supported by this keywordjava.lang.NullPointerException
- one or more type(s) are nullpublic KeywordBuilder withSimpleDigester(NodeType first, NodeType... other)
SimpleDigester
first
- the first instance type supported by this keywordother
- other instance types supported by this keywordjava.lang.NullPointerException
- one or more type(s) are nullpublic KeywordBuilder withValidatorClass(java.lang.Class<? extends KeywordValidator> c)
c
- the classjava.lang.NullPointerException
- class is nulljava.lang.IllegalArgumentException
- failed to find an appropriate
constructorpublic KeywordBuilder withValidatorFactory(KeywordValidatorFactory factory)
factory
- the factory