Give a param with type adapter, obtain type used to convert param
554100
public static String detectSourceType(SQLiteModelMethod method, TypeName adapterTypeName) {
		TypeElement a = BaseProcessor.elementUtils.getTypeElement(adapterTypeName.toString());
		for (Element i : BaseProcessor.elementUtils.getAllMembers(a)) {
			if (i.getKind() == ElementKind.METHOD && "toJava".equals(i.getSimpleName().toString())) {
				ExecutableElement m = (ExecutableElement) i;
				return TypeUtility.typeName(m.getReturnType()).toString();
			}
		}

		AssertKripton.fail("In method '%s#%s', class '%s' can not be used as type adapter", method.getParent(), method.getName(), adapterTypeName.toString());
		return null;
	}
897002
def getParam(self, paramName):
        
        param = getattr(self, paramName)
        if isinstance(param, Param):
            return param
        else:
            raise ValueError("Cannot find param with name %s." % paramName)
526579
private Type getParameterTypeOf(Type type) {
        try {
            return getLowerBoundOfSingleTypeParameter(type);
        } catch (Exception e) {
            throw new IllegalArgumentException("Unable to resolve a generic parameter type of the mapped field " + this.field + ".", e);
        }
    }
339556
def _resolveParam(self, param):
        
        if isinstance(param, Param):
            self._shouldOwn(param)
            return param
        elif isinstance(param, basestring):
            return self.getParam(param)
        else:
            raise ValueError("Cannot resolve %r as a param." % param)
1360358
private static Class<?> getActualRawType(Type type) {
        Class<?> rawType;
        if (type instanceof ParameterizedType) {
            rawType = (Class<?>) ((ParameterizedType) type).getRawType();
        } else {
            rawType = (Class<?>) type;
        }
        return rawType;
    }
374788
def get_scanner_param_type(self, param):
        
        assert isinstance(param, str)
        entry = self.scanner_params.get(param)
        if not entry:
            return None
        return entry.get('type')
426808
Object toSimpleValue(Class<?> genericType, Object element, TypeAdapters typeAdapters) {
        if (element == null) {
            return null;
        }
        log.info("Convert from " + element.getClass().getName() + " to " + genericType.getName());
        if (genericType.isEnum() && (element instanceof String)) {
            @SuppressWarnings({ "unchecked", "rawtypes" })
            Enum<?> enumValue = Enum.valueOf((Class<? extends Enum>) genericType, (String) element);
            return enumValue;
        }
        Converter converter = SIMPLE_VALUE_CONVERTERS.get(genericType.getName());
        if (converter != null) {
            return converter.convert(element);
        }
        if ((element instanceof String) && (typeAdapters != null)) {
            TypeAdapter<?> adapter = typeAdapters.getTypeAdapter(genericType);
            if (adapter != null) {
                return adapter.deserialize((String) element);
            }
        }
        return element;
    }
101233
function paramConverterMiddleware(handler, action) {

	function convertProperties(obj, schema) {
		Object.keys(schema).forEach(key => {
			const s = schema[key];
			const val = obj[key];
			if (val == null)
				return;

			if (s.type == "string" && typeof val !== "string") {
				obj[key] = "" + val;
			} else if (s.type == "number" && typeof val !== "number") {
				obj[key] = Number(val);
			} else if (s.type == "boolean" && typeof val !== "boolean") {
				obj[key] = String(val).toLowerCase() === "true";
			} else if (s.type == "date" && !(val instanceof Date)) {
				obj[key] = new Date(val);
			} else if (s.type == "object")
				convertProperties(val, s.props);
		});
	}

	// Wrap a param validator
	if (action.params && typeof action.params === "object") {
		return function convertContextParams(ctx) {
			convertProperties(ctx.params, action.params);

			return handler(ctx);
		};
	}
	return handler;
}
135064
def stringify(type_name, value, **opts):
    
    type_name, opts = _field_options(type_name, opts)
    return converter(type_name).stringify(value, **opts)
1324594
def converter(type_name):
    """"""
    converter = TYPES.get(type_name)
    if converter is None:
        raise ConverterError('Unknown converter: %r' % type_name)
    return converter()
1048420
private RelType convertContext(String type)
	{
		if (type.equals("I")) return RelType.INPUT;
		if (type.equals("O")) return RelType.OUTPUT;
		if (type.equals("B")) return null;
		throw new IllegalArgumentException("Unknown context: " + type);
	}
1074357
static Type getRawType(Type genericType, Map<TypeVariable, Type> typeVariableMap) {
		Type resolvedType = genericType;
		if (genericType instanceof TypeVariable) {
			TypeVariable tv = (TypeVariable) genericType;
			resolvedType = typeVariableMap.get(tv);
			if (resolvedType == null) {
				resolvedType = extractBoundForTypeVariable(tv);
			}
		}
		if (resolvedType instanceof ParameterizedType) {
			return ((ParameterizedType) resolvedType).getRawType();
		}
		else {
			return resolvedType;
		}
	}
1164252
private String getParameterJSDocType(List<JSType> types, int index, int minArgs, int maxArgs) {
    JSType type = types.get(index);
    if (index < minArgs) {
      return type.toAnnotationString(Nullability.EXPLICIT);
    }
    boolean isRestArgument = maxArgs == Integer.MAX_VALUE && index == types.size() - 1;
    if (isRestArgument) {
      return "..." + restrictByUndefined(type).toAnnotationString(Nullability.EXPLICIT);
    }
    return restrictByUndefined(type).toAnnotationString(Nullability.EXPLICIT) + "=";
  }
716047
function loadAdapter(type, location) {
    var options = adapterConfig[type];
    try {
        var modulePath = adapterModulePath(type, options);

        global.JuttleAdapterAPI = JuttleAdapterAPI;

        var start = new Date();

        if (!options.builtin) {
            checkCompatible(type, modulePath, location);
        }

        var init = require(modulePath);

        var loaded = new Date();
        var adapter = init(options);

        global.JuttleAdapterAPI = undefined;

        if (adapter.name !== type) {
            throw new Error('adapter name ', adapter.name, ' != type ', type);
        }
        var initialized = new Date();

        logger.debug(adapter.name, 'adapter loaded in', (loaded - start), 'ms,',
                     'initialized in', (initialized - loaded), 'ms');

        register(adapter.name, adapter);

        return adapter;
    } catch (err) {
        logger.error('error loading adapter ' + type + ': ' + err.message);
        throw err;
    }
}
232051
def get_ext_param(self, ext_key, param_key):
        '''
        
        '''
        return self.extensions[ext_key][param_key] if self.extensions[ext_key]\
                else None
16048
def check_type(param, datatype):
    
    if param is None:
        return param

    if getattr(datatype, 'clean', None) and callable(datatype.clean):
        try:
            return datatype.clean(param)
        except ValueError:
            raise BadArgumentError(param)

    elif isinstance(datatype, str):
        # You've given it something like `'bool'` as a string.
        # This is the legacy way of doing it.
        datatype = {
            'str': str,
            'bool': bool,
            'float': float,
            'date': datetime.date,
            'datetime': datetime.datetime,
            'timedelta': datetime.timedelta,
            'json': 'json',  # exception
            'int': int,
        }[datatype]

    if datatype is str and not isinstance(param, basestring):
        try:
            param = str(param)
        except ValueError:
            param = str()

    elif datatype is int and not isinstance(param, int):
        try:
            param = int(param)
        except ValueError:
            param = int()

    elif datatype is bool and not isinstance(param, bool):
        param = str(param).lower() in ("true", "t", "1", "y", "yes")

    elif (
        datatype is datetime.datetime and
        not isinstance(param, datetime.datetime)
    ):
        try:
            param = dtutil.string_to_datetime(param)
        except ValueError:
            param = None

    elif datatype is datetime.date and not isinstance(param, datetime.date):
        try:
            param = dtutil.string_to_datetime(param).date()
        except ValueError:
            param = None

    elif (
        datatype is datetime.timedelta and
        not isinstance(param, datetime.timedelta)
    ):
        try:
            param = dtutil.strHoursToTimeDelta(param)
        except ValueError:
            param = None

    elif datatype == "json" and isinstance(param, basestring):
        try:
            param = json.loads(param)
        except ValueError:
            param = None

    return param
713775
public <T> TypeAdapter<T> getAdapter(Class<T> type) {
    return getAdapter(TypeToken.get(type));
  }