Package org.codehaus.jackson.map
Class MappingIterator<T>
java.lang.Object
org.codehaus.jackson.map.MappingIterator<T>
- All Implemented Interfaces:
Iterator<T>
Iterator exposed by
ObjectMapper
when binding sequence of
objects. Extension is done to allow more convenient exposing of
IOException
(which basic Iterator
does not expose)- Since:
- 1.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
Flag that indicates whether inputJsonParser
should be closed when we are done or not; generally only called when caller did not pass JsonParser.protected final DeserializationContext
protected final JsonDeserializer<T>
protected boolean
Flag that is set when we have determined whathasNextValue()
should value; reset whennextValue()
is calledprotected JsonParser
protected final JavaType
protected final T
If not null, "value to update" instead of creating a new instance for each call.protected static final MappingIterator<?>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MappingIterator
(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) protected
MappingIterator
(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser, boolean closeParser, Object valueToUpdate) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> MappingIterator<T>
boolean
hasNext()
boolean
Equivalent ofnext()
but one that may throw checked exceptions from Jackson due to invalid input.next()
void
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
EMPTY_ITERATOR
-
_type
-
_context
-
_deserializer
-
_parser
-
_closeParser
protected final boolean _closeParserFlag that indicates whether inputJsonParser
should be closed when we are done or not; generally only called when caller did not pass JsonParser. -
_hasNextChecked
protected boolean _hasNextCheckedFlag that is set when we have determined whathasNextValue()
should value; reset whennextValue()
is called -
_updatedValue
If not null, "value to update" instead of creating a new instance for each call.
-
-
Constructor Details
-
MappingIterator
protected MappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) -
MappingIterator
protected MappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser, boolean closeParser, Object valueToUpdate) - Since:
- 1.9.3
-
-
Method Details
-
emptyIterator
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
hasNextValue
Equivalent ofnext()
but one that may throw checked exceptions from Jackson due to invalid input.- Throws:
IOException
-
nextValue
- Throws:
IOException
-