java.lang.Object
tools.jackson.core.json.DupDetector
Helper class used if
StreamReadFeature.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).-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionchild()booleanMethod 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 namesvoidreset()static DupDetectorstatic DupDetector
-
Field Details
-
_source
We need to store a back-reference here to parser/generator. -
_firstName
-
_secondName
-
_seen
Lazily constructed set of names already seen within this context.
-
-
Method Details
-
rootDetector
-
rootDetector
-
child
-
reset
public void reset() -
findLocation
-
getSource
- Returns:
- Source object (parser / generator) used to construct this detector
-
isDup
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- Parameters:
name- Property seen- Returns:
Trueif the property had already been seen before in this context
-