Class ParseFieldRegistry<T>

org.elasticsearch.common.xcontent.ParseFieldRegistry<T>

public class ParseFieldRegistry<T> extends
Registry for looking things up using ParseField semantics.
  • Constructor Summary

    Constructors
    Constructor
    Description
     registryName)
    Build the registry.
  • Method Summary

    Modifier and Type
    Method
    Description
    <>
    All the names under which values are registered.
     name, org.elasticsearch.common.xcontent.XContentLocation xContentLocation, org.elasticsearch.common.xcontent.DeprecationHandler deprecationHandler)
    Lookup a value from the registry by name while checking that the name matches the ParseField.
     name, org.elasticsearch.common.xcontent.DeprecationHandler deprecationHandler)
    Lookup a value from the registry by name while checking that the name matches the ParseField.
    void
    register​(T value,  name)
    Register a parser.
    void
    register​(T value, org.elasticsearch.common.xcontent.ParseField parseField)
    Register a parser.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • ParseFieldRegistry

      public ParseFieldRegistry( registryName)
      Build the registry.
      Parameters:
      registryName - used for error messages
  • Method Details

    • getNames

      public <> getNames()
      All the names under which values are registered. Expect this to be used mostly for testing.
    • register

      public void register(T value,  name)
      Register a parser.
    • register

      public void register(T value, org.elasticsearch.common.xcontent.ParseField parseField)
      Register a parser.
    • lookup

      public  name, org.elasticsearch.common.xcontent.XContentLocation xContentLocation, org.elasticsearch.common.xcontent.DeprecationHandler deprecationHandler)
      Lookup a value from the registry by name while checking that the name matches the ParseField.
      Parameters:
      name - The name of the thing to look up.
      Returns:
      The value being looked up. Never null.
      Throws:
      ParsingException - if the named thing isn't in the registry or the name was deprecated and deprecated names aren't supported.
    • lookupReturningNullIfNotFound

      public  name, org.elasticsearch.common.xcontent.DeprecationHandler deprecationHandler)
      Lookup a value from the registry by name while checking that the name matches the ParseField.
      Parameters:
      name - The name of the thing to look up.
      Returns:
      The value being looked up or null if it wasn't found.
      Throws:
      ParsingException - if the named thing isn't in the registry or the name was deprecated and deprecated names aren't supported.