Apache CXF API

org.apache.cxf.jaxrs.utils
Class InjectionUtils

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

public final class InjectionUtils
extends Object


Method Summary
static Method checkProxy(Method methodToInvoke, Object resourceObject)
           
static
<T> Object
convertStringToPrimitive(String value, Class<?> cls)
           
static Object createParameterObject(List<String> paramValues, Class<?> paramType, Type genericType, Annotation[] paramAnns, String defaultValue, boolean decoded, ParameterType pathParam, 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 javax.ws.rs.core.MultivaluedMap<String,Object> extractValuesFromBean(Object bean, String baseName)
           
static void fillInValuesFromBean(Object bean, String baseName, javax.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 Map<Parameter,Class<?>> getParametersFromBeanClass(Class<?> beanClass, ParameterType type, boolean checkIgnorable)
           
static Class<?> getRawType(Type genericType)
           
static Type getSuperType(Class<?> serviceClass, TypeVariable<?> var)
           
static Type getType(Type[] types, int pos)
           
static Object handleBean(Class<?> paramType, Annotation[] paramAnns, javax.ws.rs.core.MultivaluedMap<String,String> values, ParameterType pType, Message message, boolean decoded)
           
static
<T> T
handleParameter(String value, boolean decoded, Class<T> pClass, Annotation[] paramAnns, ParameterType pType, Message message)
           
static void injectContextField(AbstractResourceInfo cri, Field f, Object o, Object value)
           
static void injectContextFields(Object o, AbstractResourceInfo cri, Message m)
           
static void injectContextMethods(Object requestObject, AbstractResourceInfo cri, Message message)
           
static void injectContextProxies(AbstractResourceInfo cri, Object instance)
           
static void injectContextProxiesAndApplication(AbstractResourceInfo cri, Object instance, javax.ws.rs.core.Application app)
           
static void injectContexts(Object requestObject, AbstractResourceInfo resource, Message message)
           
static void injectFieldValue(Field f, Object o, Object v)
           
static void injectThroughMethod(Object requestObject, Method method, Object parameterValue)
           
static void invokeLifeCycleMethod(Object instance, Method method)
           
static boolean isConcreteClass(Class<?> cls)
           
static boolean isPrimitive(Class<?> type)
           
static boolean isSupportedCollectionOrArray(Class<?> type)
           
static void reportServerError(String messageName, String parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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)

extractFromMethod

public static Object extractFromMethod(Object requestObject,
                                       Method method)

handleParameter

public static <T> T handleParameter(String value,
                                    boolean decoded,
                                    Class<T> pClass,
                                    Annotation[] paramAnns,
                                    ParameterType pType,
                                    Message message)

reportServerError

public static void reportServerError(String messageName,
                                     String parameter)

handleBean

public static Object handleBean(Class<?> paramType,
                                Annotation[] paramAnns,
                                javax.ws.rs.core.MultivaluedMap<String,String> values,
                                ParameterType pType,
                                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,
                                           Message message)

createThreadLocalProxy

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

injectContextProxiesAndApplication

public static void injectContextProxiesAndApplication(AbstractResourceInfo cri,
                                                      Object instance,
                                                      javax.ws.rs.core.Application app)

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,
                                  Message message)

injectContextMethods

public static void injectContextMethods(Object requestObject,
                                        AbstractResourceInfo cri,
                                        Message message)

injectContextFields

public static void injectContextFields(Object o,
                                       AbstractResourceInfo cri,
                                       Message m)

extractValuesFromBean

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

fillInValuesFromBean

public static void fillInValuesFromBean(Object bean,
                                        String baseName,
                                        javax.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)

decodeValue

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

invokeLifeCycleMethod

public static void invokeLifeCycleMethod(Object instance,
                                         Method method)

convertStringToPrimitive

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

Apache CXF API

Apache CXF