Class<?> clazz = service.getClass();
Method[] methods = clazz.getMethods();
Map<String, Method> restMethods = new HashMap<String, Method>(
0);
String methodName;
HttpMethodType type = null;
for (Method m : methods) {
type = null;
methodName = m.getName();
if (methodName.equalsIgnoreCase("getClass")
|| m.isAnnotationPresent(Path.class))
continue;
type = JRestGuiceProcessorHelper.getHttpMethodType(m);
if (type != null){
if(type == HttpMethodType.ACTION) {
String value = m.getAnnotation(Action.class).value();
if(value.trim().equals(""))
value = m.getName();
restMethods.put(type.name()+":"+value, m);
} else
restMethods.put(type.name(), m);
}
}
restServiceMethodMap.put(name, restMethods);
}