Package org.apache.cxf.jaxrs.ext.search
Class ParamConverterUtils
java.lang.Object
org.apache.cxf.jaxrs.ext.search.ParamConverterUtils
Helper class to work with parameter converter providers and parameter converters.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> StringConverts the instance of particular type into its string-based representation using parameter converter provider and available parameter converter.static <T> TConverts the string-based representation of the value to the instance of particular type using parameter converter provider and available parameter converter.
-
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 representationprovider- parameter converter provider to usevalue- 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 representationprovider- parameter converter provider to usevalue- the typed instance to convert to string representation- Returns:
- string-based representation of the instance of particular type
-