Class ParamConverterUtils

java.lang.Object
org.apache.cxf.jaxrs.ext.search.ParamConverterUtils

public final class ParamConverterUtils extends Object
Helper class to work with parameter converter providers and parameter converters.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> String
    getString(Class<T> type, jakarta.ws.rs.ext.ParamConverterProvider provider, T value)
    Converts the instance of particular type into its string-based representation using parameter converter provider and available parameter converter.
    static <T> T
    getValue(Class<T> type, jakarta.ws.rs.ext.ParamConverterProvider provider, String value)
    Converts the string-based representation of the value to the instance of particular type using parameter converter provider and available parameter converter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getValue

      public static <T> T getValue(Class<T> type, jakarta.ws.rs.ext.ParamConverterProvider provider, String value)
      Converts the string-based representation of the value to the instance of particular type using parameter converter provider and available parameter converter.
      Parameters:
      type - type to convert from string-based representation
      provider - parameter converter provider to use
      value - the string-based representation to convert
      Returns:
      instance of particular type converter from its string representation
    • getString

      public static <T> String getString(Class<T> type, jakarta.ws.rs.ext.ParamConverterProvider provider, T value)
      Converts the instance of particular type into its string-based representation using parameter converter provider and available parameter converter.
      Parameters:
      type - type to convert to string-based representation
      provider - parameter converter provider to use
      value - the typed instance to convert to string representation
      Returns:
      string-based representation of the instance of particular type