@Override
    public SerIterator createChild(final Object value, final SerIterator parent) {
        Class<?> declaredType = parent.valueType();
        List<Class<?>> childGenericTypes = parent.valueTypeTypes();
        if (value instanceof Grid) {
            if (childGenericTypes.size() == 1) {
                return grid((Grid<?>) value, declaredType, childGenericTypes.get(0), EMPTY_VALUE_TYPES);
            }
            return grid((Grid<?>) value, Object.class, Object.class, EMPTY_VALUE_TYPES);
        }
        return super.createChild(value, parent);
    }
@ Override public SerIterator createChild ( final Object value , final SerIterator parent ) { Class < ? > declaredType = parent . valueType ( ) ; List < Class < ? > > childGenericTypes = parent . valueTypeTypes ( ) ; if ( value instanceof Grid ) { if ( childGenericTypes . size ( ) == 1 ) { return grid ( ( Grid < ? > ) value , declaredType , childGenericTypes . get ( 0 ) , EMPTY_VALUE_TYPES ) ; } return grid ( ( Grid < ? > ) value , Object . class , Object . class , EMPTY_VALUE_TYPES ) ; } return super . createChild ( value , parent ) ; }
Creates an iterator wrapper for a value retrieved from a parent iterator.
<p>
Allows the parent iterator to define the child iterator using generic type information.
This handles cases such as a {@code List} as the value in a {@code Map}.

@param value  the possible collection-like object, not null
@param parent  the parent iterator, not null
@return the iterator, null if not a collection-like type