public final class KeywordRegistry extends Object
Do not use this class anymore: use MetaSchema
instead
KeywordRegistries
Constructor and Description |
---|
KeywordRegistry()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addFormatAttribute(String name,
FormatAttribute formatAttribute)
Add a format attribute
|
void |
addKeyword(Keyword keyword)
Add a keyword to this registry
|
Map<String,FormatAttribute> |
getFormatAttributes()
Return an immutable map of format attributes for this registry
|
Map<String,SyntaxChecker> |
getSyntaxCheckers()
Return an immutable copy of this registry's syntax checkers
|
Map<String,Class<? extends KeywordValidator>> |
getValidators()
Return an immutable copy of this registry's keyword validator classes
|
void |
removeFormatAttribute(String name)
Remove a format attribute by name
|
void |
removeKeyword(String name)
Remove a keyword by its name
|
public KeywordRegistry()
By default, a keyword registry is completely empty.
public Map<String,SyntaxChecker> getSyntaxCheckers()
public Map<String,Class<? extends KeywordValidator>> getValidators()
public void addKeyword(Keyword keyword)
Note: this method removes any previous traces of a keyword by the same name.
keyword
- the keywordpublic void removeKeyword(String name)
name
- the keyword namepublic void addFormatAttribute(String name, FormatAttribute formatAttribute)
name
- the attribute nameformatAttribute
- the attribute implementationpublic void removeFormatAttribute(String name)
name
- the name of the format attributepublic Map<String,FormatAttribute> getFormatAttributes()
Copyright © 2013. All Rights Reserved.