Package org.apache.cxf.jaxrs.utils
Class InjectionUtils
java.lang.Object
org.apache.cxf.jaxrs.utils.InjectionUtils
-
Field Summary
Modifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic Method
checkProxy
(Method methodToInvoke, Object resourceObject) static Object
convertStringToPrimitive
(String value, Class<?> cls) static Object
convertStringToPrimitive
(String value, Class<?> cls, Annotation[] anns) static <T> T
createFromParameterHandler
(String value, Class<T> pClass, Type genericType, Annotation[] anns, org.apache.cxf.message.Message message) static Object
createParameterObject
(List<String> paramValues, Class<?> paramType, Type genericType, Annotation[] paramAnns, String defaultValue, boolean decoded, ParameterType pathParam, org.apache.cxf.message.Message message) static <T> ThreadLocalProxy<T>
createThreadLocalProxy
(Class<T> type) static String
decodeValue
(String value, boolean decode, ParameterType param) static Object
extractFieldValue
(Field f, Object o) static Object
extractFromMethod
(Object requestObject, Method method) static Object
extractFromMethod
(Object requestObject, Method method, boolean logError) extractValuesFromBean
(Object bean, String baseName) static void
fillInValuesFromBean
(Object bean, String baseName, jakarta.ws.rs.core.MultivaluedMap<String, Object> values) static Class<?>
getActualType
(Type genericType) static Class<?>
getActualType
(Type genericType, int pos) static Type[]
getActualTypes
(Type genericType) static Field
getDeclaredField
(Class<?> cls, String fieldName) static Object
static Type
getGenericResponseType
(Method invoked, Class<?> serviceCls, Object targetObject, Class<?> targetType, org.apache.cxf.message.Exchange exchange) static Method
getGetterFromSetter
(Method setter) static <T> Optional<jakarta.ws.rs.ext.ParamConverter<T>>
getParamConverter
(Class<T> pClass, Type genericType, Annotation[] anns, org.apache.cxf.message.Message message) getParametersFromBeanClass
(Class<?> beanClass, ParameterType type, boolean checkIgnorable) static Class<?>
getRawResponseClass
(Object targetObject) static Class<?>
getRawType
(Type genericType) static Type
getSuperType
(Class<?> serviceClass, TypeVariable<?> var) static Type
static Object
handleBean
(Class<?> paramType, Annotation[] paramAnns, jakarta.ws.rs.core.MultivaluedMap<String, String> values, ParameterType pType, org.apache.cxf.message.Message message, boolean decoded) static <T> T
handleParameter
(String value, boolean decoded, Class<T> pClass, Type genericType, Annotation[] paramAnns, ParameterType pType, org.apache.cxf.message.Message message) static void
injectConstructorProxies
(Object o, AbstractResourceInfo cri, org.apache.cxf.message.Message m) static void
injectContextField
(AbstractResourceInfo cri, Field f, Object o, Object value) static void
injectContextFields
(Object o, AbstractResourceInfo cri, org.apache.cxf.message.Message m) static void
injectContextMethods
(Object requestObject, AbstractResourceInfo cri, org.apache.cxf.message.Message message) static void
injectContextProxies
(AbstractResourceInfo cri, Object instance) static void
injectContextProxiesAndApplication
(AbstractResourceInfo cri, Object instance, jakarta.ws.rs.core.Application app, ProviderFactory factory) static void
injectContexts
(Object requestObject, AbstractResourceInfo resource, org.apache.cxf.message.Message message) static void
injectFieldValue
(Field f, Object o, Object v) static void
injectThroughMethod
(Object requestObject, Method method, Object parameterValue) static void
injectThroughMethod
(Object requestObject, Method method, Object parameterValue, org.apache.cxf.message.Message inMessage) static void
invokeLifeCycleMethod
(Object instance, Method method) static boolean
isConcreteClass
(Class<?> cls) static boolean
isPrimitive
(Class<?> type) static boolean
isPrimitiveOnly
(Class<?> type) static boolean
isSupportedCollectionOrArray
(Class<?> type) static Type
processGenericTypeIfNeeded
(Class<?> serviceCls, Class<?> paramCls, Type type) static void
reportServerError
(String messageName, String parameter) static void
reportServerError
(String messageName, String parameter, boolean logError) static Class<?>
updateParamClassToTypeIfNeeded
(Class<?> paramCls, Type type)
-
Field Details
-
STANDARD_CONTEXT_CLASSES
-
VALUE_CONTEXTS
-
-
Method Details
-
getDeclaredField
-
isConcreteClass
-
getSuperType
-
checkProxy
-
injectFieldValue
-
extractFieldValue
-
getActualType
-
getActualType
-
getType
-
getRawType
-
getActualTypes
-
injectThroughMethod
-
injectThroughMethod
-
extractFromMethod
-
extractFromMethod
-
handleParameter
public static <T> T handleParameter(String value, boolean decoded, Class<T> pClass, Type genericType, Annotation[] paramAnns, ParameterType pType, org.apache.cxf.message.Message message) -
getParamConverter
public static <T> Optional<jakarta.ws.rs.ext.ParamConverter<T>> getParamConverter(Class<T> pClass, Type genericType, Annotation[] anns, org.apache.cxf.message.Message message) -
createFromParameterHandler
public static <T> T createFromParameterHandler(String value, Class<T> pClass, Type genericType, Annotation[] anns, org.apache.cxf.message.Message message) -
reportServerError
-
reportServerError
-
handleBean
public static Object handleBean(Class<?> paramType, Annotation[] paramAnns, jakarta.ws.rs.core.MultivaluedMap<String, String> values, ParameterType pType, org.apache.cxf.message.Message message, boolean decoded) -
isSupportedCollectionOrArray
-
createParameterObject
public static Object createParameterObject(List<String> paramValues, Class<?> paramType, Type genericType, Annotation[] paramAnns, String defaultValue, boolean decoded, ParameterType pathParam, org.apache.cxf.message.Message message) -
createThreadLocalProxy
-
getGetterFromSetter
- Throws:
Exception
-
injectContextProxiesAndApplication
public static void injectContextProxiesAndApplication(AbstractResourceInfo cri, Object instance, jakarta.ws.rs.core.Application app, ProviderFactory factory) -
injectContextProxies
-
injectContextField
-
injectContexts
public static void injectContexts(Object requestObject, AbstractResourceInfo resource, org.apache.cxf.message.Message message) -
injectContextMethods
public static void injectContextMethods(Object requestObject, AbstractResourceInfo cri, org.apache.cxf.message.Message message) -
injectContextFields
public static void injectContextFields(Object o, AbstractResourceInfo cri, org.apache.cxf.message.Message m) -
injectConstructorProxies
public static void injectConstructorProxies(Object o, AbstractResourceInfo cri, org.apache.cxf.message.Message m) -
extractValuesFromBean
-
fillInValuesFromBean
-
getParametersFromBeanClass
public static Map<Parameter,Class<?>> getParametersFromBeanClass(Class<?> beanClass, ParameterType type, boolean checkIgnorable) -
isPrimitive
-
isPrimitiveOnly
-
decodeValue
-
invokeLifeCycleMethod
-
convertStringToPrimitive
-
convertStringToPrimitive
-
getRawResponseClass
-
getGenericResponseType
-
updateParamClassToTypeIfNeeded
-
processGenericTypeIfNeeded
-
getEntity
-