Package com.sun.jersey.core.reflection

Examples of com.sun.jersey.core.reflection.AnnotatedMethod


  protected Set<Class> getDefiningClasses(AbstractResource resourceClass) {
    HashSet<Class> definingClasses = new HashSet<Class>();

    for (AbstractResourceMethod resourceMethod : resourceClass.getResourceMethods()) {
      definingClasses.add(new AnnotatedMethod(resourceMethod.getMethod()).getMethod().getDeclaringClass());
    }

    for (AbstractResourceMethod resourceMethod : resourceClass.getSubResourceMethods()) {
      definingClasses.add(new AnnotatedMethod(resourceMethod.getMethod()).getMethod().getDeclaringClass());
    }

    for (AbstractSubResourceLocator locator : resourceClass.getSubResourceLocators()) {
      definingClasses.add(new AnnotatedMethod(locator.getMethod()).getMethod().getDeclaringClass());
    }

    return definingClasses;
  }
View Full Code Here


                // append value of method's @Path annotation
                MethodList methods = new MethodList(link.resource());
                methods = methods.hasAnnotation(Path.class);
                Iterator<AnnotatedMethod> iterator = methods.iterator();
                while (iterator.hasNext()) {
                    AnnotatedMethod method = iterator.next();
                    if (!method.getMethod().getName().equals(link.method()))
                        continue;
                    Path methodPath = method.getAnnotation(Path.class);
                    String methodTemplate = methodPath.value();
                    StringBuilder builder = new StringBuilder();
                    builder.append(template);
                    if (!(template.endsWith("/") || methodTemplate.startsWith("/")))
                        builder.append("/");
View Full Code Here

TOP

Related Classes of com.sun.jersey.core.reflection.AnnotatedMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.