Package org.apache.cxf.jaxrs.ext.search
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> StringgetString(Class<T> type, javax.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> TgetValue(Class<T> type, javax.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.
-
-
-
Method Detail
-
getValue
public static <T> T getValue(Class<T> type, javax.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, javax.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
-
-