/** * Create a new instance from an existing AbstractResource but * defining a new path. * * @param path the path. * @param ar the existing abstract resource. */ public AbstractResource(String path, AbstractResource ar) { this.uriPath = new PathValue(path); this.resourceClass = ar.resourceClass; this.constructors = ar.constructors; this.fields = ar.fields; this.setterMethods = ar.setterMethods; this.resourceMethods = ar.resourceMethods; this.subResourceMethods = ar.subResourceMethods; this.subResourceLocators = ar.subResourceLocators; this.postConstructMethods = ar.postConstructMethods; this.preDestroyMethods = ar.preDestroyMethods; }
private static void workOutSubResourceLocatorsList( AbstractResource resource, MethodList methodList, boolean isEncoded) { for (AnnotatedMethod m : methodList.hasNotMetaAnnotation(HttpMethod.class). hasAnnotation(Path.class)) { final Path mPathAnnotation = m.getAnnotation(Path.class); final AbstractSubResourceLocator subResourceLocator = new AbstractSubResourceLocator( resource, m.getMethod(), new PathValue( mPathAnnotation.value()), m.getAnnotations()); processParameters( subResourceLocator.getResource().getResourceClass(), subResourceLocator.getMethod().getDeclaringClass(), subResourceLocator, m, isEncoded); resource.getSubResourceLocators().add(subResourceLocator); } }
new PathValue(rPathAnnotation.value())); } else { // just a subresource class resource = new AbstractResource(resourceClass);
final PathValue pv = new PathValue(mPathAnnotation.value());
/** * Create a new instance from an existing AbstractResource but * defining a new path. * * @param path the path. * @param ar the existing abstract resource. */ public AbstractResource(String path, AbstractResource ar) { this.uriPath = new PathValue(path); this.resourceClass = ar.resourceClass; this.constructors = ar.constructors; this.fields = ar.fields; this.setterMethods = ar.setterMethods; this.resourceMethods = ar.resourceMethods; this.subResourceMethods = ar.subResourceMethods; this.subResourceLocators = ar.subResourceLocators; this.postConstructMethods = ar.postConstructMethods; this.preDestroyMethods = ar.preDestroyMethods; }
/** * Create a new instance from an existing AbstractResource but * defining a new path. * * @param path the path. * @param ar the existing abstract resource. */ public AbstractResource(String path, AbstractResource ar) { this.uriPath = new PathValue(path); this.resourceClass = ar.resourceClass; this.constructors = ar.constructors; this.fields = ar.fields; this.setterMethods = ar.setterMethods; this.resourceMethods = ar.resourceMethods; this.subResourceMethods = ar.subResourceMethods; this.subResourceLocators = ar.subResourceLocators; this.postConstructMethods = ar.postConstructMethods; this.preDestroyMethods = ar.preDestroyMethods; }
private static void workOutSubResourceLocatorsList( AbstractResource resource, MethodList methodList, boolean isEncoded) { for (AnnotatedMethod m : methodList.hasNotMetaAnnotation(HttpMethod.class). hasAnnotation(Path.class)) { final Path mPathAnnotation = m.getAnnotation(Path.class); final AbstractSubResourceLocator subResourceLocator = new AbstractSubResourceLocator( resource, m.getMethod(), new PathValue( mPathAnnotation.value()), m.getAnnotations()); processParameters( subResourceLocator.getResource().getResourceClass(), subResourceLocator.getMethod().getDeclaringClass(), subResourceLocator, m, isEncoded); resource.getSubResourceLocators().add(subResourceLocator); } }
private static void workOutSubResourceLocatorsList( AbstractResource resource, MethodList methodList, boolean isEncoded) { for (AnnotatedMethod m : methodList.hasNotMetaAnnotation(HttpMethod.class). hasAnnotation(Path.class)) { final Path mPathAnnotation = m.getAnnotation(Path.class); final AbstractSubResourceLocator subResourceLocator = new AbstractSubResourceLocator( resource, m.getMethod(), new PathValue( mPathAnnotation.value()), m.getAnnotations()); processParameters( subResourceLocator.getResource().getResourceClass(), subResourceLocator.getMethod().getDeclaringClass(), subResourceLocator, m, isEncoded); resource.getSubResourceLocators().add(subResourceLocator); } }
new PathValue(rPathAnnotation.value())); } else { // just a subresource class resource = new AbstractResource(resourceClass);
new PathValue(rPathAnnotation.value())); } else { // just a subresource class resource = new AbstractResource(resourceClass);
final PathValue pv = new PathValue(mPathAnnotation.value());
final PathValue pv = new PathValue(mPathAnnotation.value());