public class DupDetector extends Object
JsonParser.Feature.STRICT_DUPLICATE_DETECTION
is enabled.
Optimized to try to limit memory usage and processing overhead for smallest
entries, but without adding trashing (immutable objects would achieve optimal
memory usage but lead to significant number of discarded temp objects for
scopes with large number of entries). Another consideration is trying to limit
actual number of compiled classes as it contributes significantly to overall
jar size (due to linkage etc).Modifier and Type | Field and Description |
---|---|
protected String |
_firstName |
protected String |
_secondName |
protected HashSet<String> |
_seen
Lazily constructed set of names already seen within this context.
|
protected Object |
_source
We need to store a back-reference here to parser/generator, unfortunately.
|
Modifier and Type | Method and Description |
---|---|
DupDetector |
child() |
JsonLocation |
findLocation() |
boolean |
isDup(String name) |
void |
reset() |
static DupDetector |
rootDetector(JsonGenerator g) |
static DupDetector |
rootDetector(JsonParser p) |
protected final Object _source
protected String _firstName
protected String _secondName
public static DupDetector rootDetector(JsonParser p)
public static DupDetector rootDetector(JsonGenerator g)
public DupDetector child()
public void reset()
public JsonLocation findLocation()
public boolean isDup(String name) throws JsonParseException
JsonParseException
Copyright © 2014 FasterXML. All Rights Reserved.