Package javax.ws.rs

Examples of javax.ws.rs.DefaultValue


      return createParameterExtractor(injectTargetClass, injectTarget, type, genericType, annotations, true);
   }

   public ValueInjector createParameterExtractor(Class injectTargetClass, AccessibleObject injectTarget, Class type, Type genericType, Annotation[] annotations, boolean useDefault)
   {
      DefaultValue defaultValue = findAnnotation(annotations, DefaultValue.class);
      boolean encode = findAnnotation(annotations, Encoded.class) != null || injectTarget.isAnnotationPresent(Encoded.class) || type.isAnnotationPresent(Encoded.class);
      String defaultVal = null;
      if (defaultValue != null) defaultVal = defaultValue.value();

      QueryParam query;
      HeaderParam header;
      MatrixParam matrix;
      PathParam uriParam;
View Full Code Here


                            .getInputStream());
         }
         else if (isCookie)
         {
            CookieParam cookieParam = (CookieParam) annotation;
            DefaultValue defaultValue = FindAnnotation.findAnnotation(
                    annotations, DefaultValue.class);
            String defaultVal = null;
            if (defaultValue != null)
               defaultVal = defaultValue.value();

            return new CookieParamInjector(type, genericType, method,
                    cookieParam.value(), defaultVal, annotations, factory).inject(request,
                    null);
         }
View Full Code Here

        }
        return httpMethod;
    }

    private String getDefaultValue(Method method) {
        DefaultValue defaultValueAnn = method.getAnnotation(DefaultValue.class);
        if (defaultValueAnn != null) {
            return defaultValueAnn.value();
        }
        return null;
    }
View Full Code Here

        return null;
    }

    public static String getDefaultParameterValue(Annotation[] anns) {

        DefaultValue dv = AnnotationUtils.getAnnotation(anns, DefaultValue.class);
        return dv != null ? dv.value() : null;
    }
View Full Code Here

                                                          Encoded.class) != null;
        }
    }
   
    private void checkDefaultParameterValue() {
        DefaultValue dv = AnnotationUtils.getMethodAnnotation(annotatedMethod,
                                            DefaultValue.class);
        if (dv == null && classResourceInfo != null) {
            dv = AnnotationUtils.getClassAnnotation(
                                         classResourceInfo.getServiceClass(),
                                         DefaultValue.class);
        }
        if (dv != null) {
            defaultParamValue = dv.value();
        }
    }
View Full Code Here

        return null;
    }

    public static String getDefaultParameterValue(Annotation[] anns) {

        DefaultValue dv = AnnotationUtils.getAnnotation(anns, DefaultValue.class);
        return dv != null ? dv.value() : null;
    }
View Full Code Here

   }

   public static ValueInjector getParameterExtractor(Class injectTargetClass, AccessibleObject injectTarget, Class type, Type genericType, Annotation[] annotations, ResteasyProviderFactory providerFactory)
   {

      DefaultValue defaultValue = FindAnnotation.findAnnotation(annotations, DefaultValue.class);
      boolean encode = FindAnnotation.findAnnotation(annotations, Encoded.class) != null || injectTarget.isAnnotationPresent(Encoded.class) || type.isAnnotationPresent(Encoded.class);
      String defaultVal = null;
      if (defaultValue != null) defaultVal = defaultValue.value();

      QueryParam query;
      HeaderParam header;
      MatrixParam matrix;
      PathParam uriParam;
View Full Code Here

      return new MethodInjectorImpl(root, method, providerFactory);
   }

   public ValueInjector createParameterExtractor(Class injectTargetClass, AccessibleObject injectTarget, Class type, Type genericType, Annotation[] annotations)
   {
      DefaultValue defaultValue = findAnnotation(annotations, DefaultValue.class);
      boolean encode = findAnnotation(annotations, Encoded.class) != null || injectTarget.isAnnotationPresent(Encoded.class) || type.isAnnotationPresent(Encoded.class);
      String defaultVal = null;
      if (defaultValue != null) defaultVal = defaultValue.value();

      QueryParam query;
      HeaderParam header;
      MatrixParam matrix;
      PathParam uriParam;
View Full Code Here

        return null;
    }

    public static String getDefaultParameterValue(Annotation[] anns) {

        DefaultValue dv = AnnotationUtils.getAnnotation(anns, DefaultValue.class);
        return dv != null ? dv.value() : null;
    }
View Full Code Here

                                                          Encoded.class) != null;
        }
    }
   
    private void checkDefaultParameterValue() {
        DefaultValue dv = (DefaultValue)AnnotationUtils.getMethodAnnotation(annotatedMethod,
                                            DefaultValue.class);
        if (dv == null && classResourceInfo != null) {
            dv = (DefaultValue)AnnotationUtils.getClassAnnotation(
                                         classResourceInfo.getServiceClass(),
                                         DefaultValue.class);
        }
        if (dv != null) {
            defaultParamValue = dv.value();
        }
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.DefaultValue

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.