public class ParseFieldMatcher
extends java.lang.Object
ParseField
while parsing requests. Matches a ParseField
against a field name and throw deprecation exception depending on the current value of the PARSE_STRICT
setting.Modifier and Type | Field and Description |
---|---|
static ParseFieldMatcher |
EMPTY |
static java.lang.String |
PARSE_STRICT |
static ParseFieldMatcher |
STRICT |
Constructor and Description |
---|
ParseFieldMatcher(boolean strict) |
ParseFieldMatcher(Settings settings) |
Modifier and Type | Method and Description |
---|---|
boolean |
isStrict()
Should deprecated settings be rejected?
|
boolean |
match(java.lang.String fieldName,
ParseField parseField)
Matches a
ParseField against a field name, and throws deprecation exception depending on the current
value of the PARSE_STRICT setting. |
public static final java.lang.String PARSE_STRICT
public static final ParseFieldMatcher EMPTY
public static final ParseFieldMatcher STRICT
public ParseFieldMatcher(Settings settings)
public ParseFieldMatcher(boolean strict)
public boolean isStrict()
public boolean match(java.lang.String fieldName, ParseField parseField)
ParseField
against a field name, and throws deprecation exception depending on the current
value of the PARSE_STRICT
setting.fieldName
- the field name found in the request while parsingparseField
- the parse field that we are looking forjava.lang.IllegalArgumentException
- whenever we are in strict mode and the request contained a deprecated field