Class InjectionUtils

java.lang.Object
org.apache.cxf.jaxrs.utils.InjectionUtils

public final class InjectionUtils extends Object
  • Field Details

    • STANDARD_CONTEXT_CLASSES

      public static final Set<String> STANDARD_CONTEXT_CLASSES
    • VALUE_CONTEXTS

      public static final Set<String> VALUE_CONTEXTS
  • Method Details

    • getDeclaredField

      public static Field getDeclaredField(Class<?> cls, String fieldName)
    • isConcreteClass

      public static boolean isConcreteClass(Class<?> cls)
    • getSuperType

      public static Type getSuperType(Class<?> serviceClass, TypeVariable<?> var)
    • checkProxy

      public static Method checkProxy(Method methodToInvoke, Object resourceObject)
    • injectFieldValue

      public static void injectFieldValue(Field f, Object o, Object v)
    • extractFieldValue

      public static Object extractFieldValue(Field f, Object o)
    • getActualType

      public static Class<?> getActualType(Type genericType)
    • getActualType

      public static Class<?> getActualType(Type genericType, int pos)
    • getType

      public static Type getType(Type[] types, int pos)
    • getRawType

      public static Class<?> getRawType(Type genericType)
    • getActualTypes

      public static Type[] getActualTypes(Type genericType)
    • injectThroughMethod

      public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue)
    • injectThroughMethod

      public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue, org.apache.cxf.message.Message inMessage)
    • extractFromMethod

      public static Object extractFromMethod(Object requestObject, Method method)
    • extractFromMethod

      public static Object extractFromMethod(Object requestObject, Method method, boolean logError)
    • 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

      public static void reportServerError(String messageName, String parameter)
    • reportServerError

      public static void reportServerError(String messageName, String parameter, boolean logError)
    • 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

      public static boolean isSupportedCollectionOrArray(Class<?> type)
    • 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

      public static <T> ThreadLocalProxy<T> createThreadLocalProxy(Class<T> type)
    • getGetterFromSetter

      public static Method getGetterFromSetter(Method setter) throws Exception
      Throws:
      Exception
    • injectContextProxiesAndApplication

      public static void injectContextProxiesAndApplication(AbstractResourceInfo cri, Object instance, jakarta.ws.rs.core.Application app, ProviderFactory factory)
    • injectContextProxies

      public static void injectContextProxies(AbstractResourceInfo cri, Object instance)
    • injectContextField

      public static void injectContextField(AbstractResourceInfo cri, Field f, Object o, Object value)
    • 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

      public static jakarta.ws.rs.core.MultivaluedMap<String,Object> extractValuesFromBean(Object bean, String baseName)
    • fillInValuesFromBean

      public static void fillInValuesFromBean(Object bean, String baseName, jakarta.ws.rs.core.MultivaluedMap<String,Object> values)
    • getParametersFromBeanClass

      public static Map<Parameter,Class<?>> getParametersFromBeanClass(Class<?> beanClass, ParameterType type, boolean checkIgnorable)
    • isPrimitive

      public static boolean isPrimitive(Class<?> type)
    • isPrimitiveOnly

      public static boolean isPrimitiveOnly(Class<?> type)
    • decodeValue

      public static String decodeValue(String value, boolean decode, ParameterType param)
    • invokeLifeCycleMethod

      public static void invokeLifeCycleMethod(Object instance, Method method)
    • convertStringToPrimitive

      public static Object convertStringToPrimitive(String value, Class<?> cls)
    • convertStringToPrimitive

      public static Object convertStringToPrimitive(String value, Class<?> cls, Annotation[] anns)
    • getRawResponseClass

      public static Class<?> getRawResponseClass(Object targetObject)
    • getGenericResponseType

      public static Type getGenericResponseType(Method invoked, Class<?> serviceCls, Object targetObject, Class<?> targetType, org.apache.cxf.message.Exchange exchange)
    • updateParamClassToTypeIfNeeded

      public static Class<?> updateParamClassToTypeIfNeeded(Class<?> paramCls, Type type)
    • processGenericTypeIfNeeded

      public static Type processGenericTypeIfNeeded(Class<?> serviceCls, Class<?> paramCls, Type type)
    • getEntity

      public static Object getEntity(Object o)