{
for (ResourceMethod res : methods)
{
if (res.getHttpMethod() != null && res.getHttpMethod().equals(invoker.getHttpMethod()))
{
throw new AmbiguousServiceException("Ambiguous service methods. Methods ["+invoker.getMethod().getName()+"] " +
"and ["+res.getMethod().getName()+"], declared on class ["+invoker.getResourceClass().getCanonicalName()+"] tries to serve" +
" the same rest path and HTTP method.");
}
}
methods.add(invoker);