public class ParseFieldRegistry<T>
extends java.lang.Object
Constructor | Description |
---|---|
ParseFieldRegistry(java.lang.String registryName) |
Build the registry.
|
Modifier and Type | Method | Description |
---|---|---|
java.util.Set<java.lang.String> |
getNames() |
All the names under which values are registered.
|
T |
lookup(java.lang.String name,
XContentLocation xContentLocation,
DeprecationHandler deprecationHandler) |
Lookup a value from the registry by name while checking that the name matches the ParseField.
|
T |
lookupReturningNullIfNotFound(java.lang.String name,
DeprecationHandler deprecationHandler) |
Lookup a value from the registry by name while checking that the name matches the ParseField.
|
void |
register(T value,
java.lang.String name) |
Register a parser.
|
void |
register(T value,
ParseField parseField) |
Register a parser.
|
public ParseFieldRegistry(java.lang.String registryName)
registryName
- used for error messagespublic java.util.Set<java.lang.String> getNames()
public void register(T value, java.lang.String name)
public void register(T value, ParseField parseField)
public T lookup(java.lang.String name, XContentLocation xContentLocation, DeprecationHandler deprecationHandler)
name
- The name of the thing to look up.ParsingException
- if the named thing isn't in the registry or the name was deprecated and deprecated names aren't supported.public T lookupReturningNullIfNotFound(java.lang.String name, DeprecationHandler deprecationHandler)
name
- The name of the thing to look up.ParsingException
- if the named thing isn't in the registry or the name was deprecated and deprecated names aren't supported.