package carpet.script.annotation;
import java.lang.reflect.AnnotatedParameterizedType;
import java.lang.reflect.AnnotatedType;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import carpet.script.Context;
import carpet.script.value.ListValue;
import carpet.script.value.MapValue;
import carpet.script.value.Value;
import javax.annotation.Nullable;
/**
*
Converts a {@link MapValue} to a {@link Map}, converting all of its contents to their respective types.
*
* If the {@link Param.KeyValuePairs} annotation is specified, uses its subclass at {@link PairConverter} and allows passing either a map, a list
* like [key, value, key2, value2,...] or the same as the list inlined in the function's body, unless {@link Param.KeyValuePairs#allowMultiparam()} is
* set to {@code false}.
*
* Maps provided by this converter are not linked to the initial map, and therefore will not reflect changes in either of them.
*
* @param The type of the map's keys
* @param The type of the map's values
*/
class MapConverter implements ValueConverter