Map<String, PropertyDescriptor> descriptors, List<String> params)
{
List<Object> values = new ArrayList<Object>();
for (String param : params)
{
PropertyDescriptor propertyDescriptor = descriptors.get(param);
if (propertyDescriptor == null)
{
throw new RuntimeException(
"URITemplateAnnotationResolver could not find a getter for param "
+ param);
}
Method readMethod = propertyDescriptor.getReadMethod();
if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers()))
{
readMethod.setAccessible(true);
}