Class NamedXContentRegistry.Entry
- java.lang.Object
-
- org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry
-
- Enclosing class:
- NamedXContentRegistry
public static class NamedXContentRegistry.Entry extends java.lang.ObjectAn entry in the NamedXContentRegistry containing the name of the object and the parser that can parse it.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Class<?>categoryClassThe class that this entry can read.ParseFieldnameA name for the entry which is unique within thecategoryClass.
-
Constructor Summary
Constructors Constructor Description Entry(java.lang.Class<T> categoryClass, ParseField name, CheckedFunction<XContentParser,? extends T,java.io.IOException> parser)Creates a new entry which can be stored by the registry.Entry(java.lang.Class<T> categoryClass, ParseField name, ContextParser<java.lang.Object,? extends T> parser)Creates a new entry which can be stored by the registry.
-
-
-
Field Detail
-
categoryClass
public final java.lang.Class<?> categoryClass
The class that this entry can read.
-
name
public final ParseField name
A name for the entry which is unique within thecategoryClass.
-
-
Constructor Detail
-
Entry
public Entry(java.lang.Class<T> categoryClass, ParseField name, CheckedFunction<XContentParser,? extends T,java.io.IOException> parser)Creates a new entry which can be stored by the registry.
-
Entry
public Entry(java.lang.Class<T> categoryClass, ParseField name, ContextParser<java.lang.Object,? extends T> parser)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.
-
-