for (final Method method : endpointClass.getMethods()) {
if (method.getDeclaringClass() == Object.class) {
continue;
}
final Regex regex = method.getAnnotation(Regex.class);
if (regex != null) {
final Pattern pattern = Pattern.compile(rootMapping + regex.value());
final Invoker invoker = new Invoker(instance, method, id);
int partIdx = 1; // regex index, it starts from 1
for (final Class<?> clazz : method.getParameterTypes()) {
if (HttpServletRequest.class.equals(clazz)) {
invoker.addRequestParameter();