Class ParameterList.AbstractParamGetter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Class<java.util.Collection<?>> collType
      The type of the collection.
      protected java.lang.Class<?> convertTo
      The class to convert to.
      protected javax.ws.rs.DefaultValue defaultValue
      The default value for this parameter (if given)
      protected boolean isArray
      True, if this parameter should be an array, otherwise false.
      protected ThreadLocalizedContext tlContext  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractParamGetter​(javax.ws.rs.DefaultValue defaultValue, java.lang.Class<?> convToCl, java.lang.reflect.Type convToGen, ThreadLocalizedContext tlContext)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object convertParamValue​(java.lang.String firstHeader)  
      protected java.lang.Object convertParamValue​(java.lang.String paramValue, javax.ws.rs.DefaultValue defaultValue)
      Converts the given paramValue (found in the path, query, matrix or header) into the given paramClass.
      private java.lang.Object convertParamValueInner​(java.lang.String paramValue, javax.ws.rs.DefaultValue defaultValue)
      Converts the given value without any decoding.
      protected java.lang.Object convertParamValues​(java.util.Iterator<java.lang.String> paramValueIter)  
      private java.lang.Object convertWithConverterUtils​(java.lang.String paramValue)  
      protected <A> java.util.Collection<A> createColl()  
      protected abstract boolean decoding()  
      abstract java.lang.Object getParamValue()  
      protected java.lang.Object getParamValueForPrimitive​(java.lang.String paramValue)  
      java.lang.Object getValue()
      Returns the value for this param.
      private void handleExceptionOnInvocation​(java.lang.String value, java.lang.Exception e)  
      protected <A> java.util.Collection<A> unmodifiable​(java.util.Collection<A> coll)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • collType

        protected final java.lang.Class<java.util.Collection<?>> collType
        The type of the collection. null, if this parameter do not represent a collection.
      • convertTo

        protected final java.lang.Class<?> convertTo
        The class to convert to. If this object getter represents an *Param annotated parameter, and it should be to an array or collection of something, this value contains not the collection/array type, but the generic type of it.
      • defaultValue

        protected final javax.ws.rs.DefaultValue defaultValue
        The default value for this parameter (if given)
    • Constructor Detail

      • AbstractParamGetter

        AbstractParamGetter​(javax.ws.rs.DefaultValue defaultValue,
                            java.lang.Class<?> convToCl,
                            java.lang.reflect.Type convToGen,
                            ThreadLocalizedContext tlContext)
    • Method Detail

      • convertParamValue

        protected java.lang.Object convertParamValue​(java.lang.String paramValue,
                                                     javax.ws.rs.DefaultValue defaultValue)
                                              throws ConvertParameterException
        Converts the given paramValue (found in the path, query, matrix or header) into the given paramClass.
        Parameters:
        paramValue -
        defaultValue -
        Returns:
        Throws:
        ConvertParameterException
        See Also:
        PathParam, MatrixParam, QueryParam, HeaderParam, CookieParam
      • convertParamValueInner

        private java.lang.Object convertParamValueInner​(java.lang.String paramValue,
                                                        javax.ws.rs.DefaultValue defaultValue)
                                                 throws ConvertParameterException,
                                                        javax.ws.rs.WebApplicationException
        Converts the given value without any decoding.
        Parameters:
        paramValue -
        defaultValue -
        Returns:
        Throws:
        ConvertParameterException
        javax.ws.rs.WebApplicationException - if the conversion method throws an WebApplicationException.
      • convertWithConverterUtils

        private java.lang.Object convertWithConverterUtils​(java.lang.String paramValue)
      • decoding

        protected abstract boolean decoding()
      • getParamValue

        public abstract java.lang.Object getParamValue()
        Returns:
        the concrete value of this parameter for the current request.
      • unmodifiable

        protected <A> java.util.Collection<A> unmodifiable​(java.util.Collection<A> coll)