@Override
        public boolean visit(Item item) {
            Serializer doIt = dispatch.get(item.getClass());

            if (doIt == null) {
                throw new IllegalArgumentException(item.getClass() + " not supported for YQL marshalling.");
            }

            if (state.peekFirst() != null && state.peekFirst().subItems > 0) {
                destination.append(state.peekFirst().type.separator(state));
            }
            state.addFirst(new SerializerWrapper(doIt, item));
            return doIt.serialize(destination, item);

        }
Serialize Vespa query trees to YQL+ strings.

@author Steinar Knutsen
container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java