Examples of AnnotatedMethod


Examples of org.glassfish.jersey.server.model.AnnotatedMethod

                // append value of method's @Path annotation
                MethodList methods = new MethodList(link.resource());
                methods = methods.withMetaAnnotation(HttpMethod.class);
                Iterator<AnnotatedMethod> iterator = methods.iterator();
                while (iterator.hasNext()) {
                    AnnotatedMethod method = iterator.next();
                    if (!method.getMethod().getName().equals(link.method())) {
                        continue;
                    }
                    StringBuilder builder = new StringBuilder();
                    builder.append(template);

                    Path methodPath = method.getAnnotation(Path.class);
                    if (methodPath != null) {
                        String methodTemplate = methodPath.value();

                        if (!(template.endsWith("/") || methodTemplate.startsWith("/"))) {
                            builder.append("/");
                        }
                        builder.append(methodTemplate);
                    }

                    // append query parameters
                    StringBuilder querySubString = new StringBuilder();
                    for (Annotation paramAnns[] : method.getParameterAnnotations()) {
                        for (Annotation ann : paramAnns) {
                            if (ann.annotationType() == QueryParam.class) {
                                querySubString.append(((QueryParam) ann).value());
                                querySubString.append(',');
                            }
View Full Code Here

Examples of org.milyn.annotation.AnnotatedMethod

  /**
   *
   */
  private void analyzeParameters() {

    final AnnotatedMethod aMethod = AnnotationManager.getAnnotatedClass(method.getDeclaringClass()).getAnnotatedMethod(method);

    final Annotation[][] parameterAnnotations = aMethod.getParameterAnnotations();

    int parameterSize = aMethod.getMethod().getParameterTypes().length;

    for(int i = 0; i < parameterAnnotations.length; i++) {


      for(final Annotation annotation : parameterAnnotations[i]) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.