aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/textserialize/item/ItemFormHandler.java
blob: dbd5c0a35b4ef2c4272d59f6dd47572ccbbe4b61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.query.textserialize.item;

import com.yahoo.search.query.textserialize.parser.DispatchFormHandler;

import java.util.List;

/**
 * @author Tony Vaagenes
 */
public class ItemFormHandler implements DispatchFormHandler{
    @Override
    public Object dispatch(String name, List<Object> arguments, Object dispatchContext) {
        ItemFormConverter executor = ItemExecutorRegistry.getByName(name);
        return executor.formToItem(name, new ItemArguments(arguments), (ItemContext)dispatchContext);
    }
}