Class ParameterTransformer

    • Constructor Detail

      • ParameterTransformer

        public ParameterTransformer()
    • Method Detail

      • transform

        public Object transform​(Parameter parameter,
                                String rawValue)
        Transforms the raw value from its String representation into JSON. This method does not only decode a String, it also takes the different styles into account}.
        Parameters:
        parameter - The parameter model
        rawValue - The parameter value
        Returns:
        An Object holding the transformed value.
      • transformPrimitive

        public Object transformPrimitive​(Parameter parameter,
                                         String rawValue)
        Like transform(Parameter, String), but only for values considered to be primitive.
        Parameters:
        parameter - The parameter model
        rawValue - The parameter value
        Returns:
        An Object holding the transformed value.
      • transformArray

        public Object transformArray​(Parameter parameter,
                                     String rawValue)
        Like transform(Parameter, String), but only for values considered to be an array.
        Parameters:
        parameter - The parameter model
        rawValue - The parameter value
        Returns:
        An Object holding the transformed value.
      • getObjectKeysAndValues

        protected abstract String[] getObjectKeysAndValues​(Parameter parameter,
                                                           String rawValue)
      • transformObject

        public Object transformObject​(Parameter parameter,
                                      String rawValue)
        Like transform(Parameter, String), but only for values considered to be an object.
        Parameters:
        parameter - The parameter model
        rawValue - The parameter value
        Returns:
        An Object holding the transformed value.