Interface DeprecationHandler

    • Field Detail

      • THROW_UNSUPPORTED_OPERATION

        static final DeprecationHandler THROW_UNSUPPORTED_OPERATION
        Throws an UnsupportedOperationException when parsing hits a deprecated field. Use this when creating an XContentParser that won't interact with deprecation logic at all or when you want to fail fast when parsing deprecated fields.
    • Method Detail

      • usedDeprecatedName

        void usedDeprecatedName​(String usedName,
                                String modernName)
        Called when the provided field name matches a deprecated name for the field.
        Parameters:
        usedName - the provided field name
        modernName - the modern name for the field
      • usedDeprecatedField

        void usedDeprecatedField​(String usedName,
                                 String replacedWith)
        Called when the provided field name matches the current field but the entire field has been marked as deprecated.
        Parameters:
        usedName - the provided field name
        replacedWith - the name of the field that replaced this field