public class DupDetector
extends java.lang.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 | Method and Description |
---|---|
DupDetector |
child() |
JsonLocation |
findLocation() |
java.lang.Object |
getSource() |
boolean |
isDup(java.lang.String name)
Method called to check whether a newly encountered property name would
be a duplicate within this context, and if not, update the state to remember
having seen the property name for checking more property names
|
void |
reset() |
static DupDetector |
rootDetector(JsonGenerator g) |
static DupDetector |
rootDetector(JsonParser p) |
public static DupDetector rootDetector(JsonParser p)
public static DupDetector rootDetector(JsonGenerator g)
public DupDetector child()
public void reset()
public JsonLocation findLocation()
public java.lang.Object getSource()
public boolean isDup(java.lang.String name) throws JsonParseException
name
- Property seenTrue
if the property had already been seen before in this contextJsonParseException
- to report possible operation problem (default implementation
never throws it)Copyright © 2010 - 2023 Adobe. All Rights Reserved