private static Parameter<?> buildQueryParam(final Method method,
final AnnotationSet annotations,
final Class<?> paramType)
{
QueryParam queryParam = annotations.get(QueryParam.class);
Optional optional = annotations.get(Optional.class);
String paramName = queryParam.value();
if (INVALID_CHAR_PATTERN.matcher(paramName).find())
{
throw new ResourceConfigException("Unsupported character in the parameter name :"
+ paramName);
}
Class<? extends TyperefInfo> typerefInfoClass = queryParam.typeref();
try
{
@SuppressWarnings({"unchecked", "rawtypes"})
Parameter<?> param =
new Parameter(queryParam.value(),
paramType,
getDataSchema(paramType, getSchemaFromTyperefInfo(typerefInfoClass)),
optional != null,
getDefaultValueData(optional),
Parameter.ParamType.QUERY,