Package org.elasticsearch.xcontent
Class NamedXContentRegistry.Entry
java.lang.Object
org.elasticsearch.xcontent.NamedXContentRegistry.Entry
- Enclosing class:
- NamedXContentRegistry
An entry in the NamedXContentRegistry containing the name of the object and the parser that can parse it.
-
Field Summary
Modifier and TypeFieldDescriptionfinal Class<?>
The class that this entry can read.final ParseField
A name for the entry which is unique within thecategoryClass
. -
Constructor Summary
ConstructorDescriptionEntry
(Class<T> categoryClass, ParseField name, CheckedFunction<XContentParser, ? extends T, IOException> parser) Creates a new entry which can be stored by the registry.Entry
(Class<T> categoryClass, ParseField name, ContextParser<Object, ? extends T> parser) Creates a new entry which can be stored by the registry. -
Method Summary
-
Field Details
-
categoryClass
The class that this entry can read. -
name
A name for the entry which is unique within thecategoryClass
.
-
-
Constructor Details
-
Entry
public Entry(Class<T> categoryClass, ParseField name, CheckedFunction<XContentParser, ? extends T, IOException> parser) Creates a new entry which can be stored by the registry. -
Entry
Creates a new entry which can be stored by the registry. PreferEntry(Class, ParseField, CheckedFunction)
unless you need a context to carry around while parsing.
-