public JaxrsResourceMethod(MetaMethod method, JaxrsHeaders headers, String rootResourcePath) { Path subResourcePath = method.getAnnotation(Path.class); String fullPath = rootResourcePath; if (fullPath.startsWith("/")) { fullPath = fullPath.substring(1); } if (fullPath.endsWith("/")) { fullPath = fullPath.substring(0, fullPath.length() - 1); } if (subResourcePath != null) { if (!subResourcePath.value().startsWith("/")) { fullPath += "/"; } fullPath += subResourcePath.value(); } this.method = method; this.path = fullPath; this.httpMethod = JaxrsGwtRequestMethodMapper.fromMethod(method); this.parameters = JaxrsResourceMethodParameters.fromMethod(method); this.methodHeaders = JaxrsHeaders.fromMethod(method); this.resourceClassHeaders = headers; }