* @param type the bean type to build, not null
* @return the bean, not null
*/
public static <T> T decodeQueryParams(UriInfo uriInfo, Class<T> type) {
FudgeContext context = OpenGammaFudgeContext.getInstance();
MutableFudgeMsg msg = context.newMessage();
for (Entry<String, List<String>> entry : uriInfo.getQueryParameters().entrySet()) {
String key = entry.getKey();
List<String> values = entry.getValue();
for (String value : values) {
decode(msg, key, value);