public final class InjectionUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Set<String> |
STANDARD_CONTEXT_CLASSES |
static Set<String> |
VALUE_CONTEXTS |
Modifier and Type | Method and Description |
---|---|
static 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,
Message message) |
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 Object |
extractFromMethod(Object requestObject,
Method method,
boolean logError) |
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 Field |
getDeclaredField(Class<?> cls,
String fieldName) |
static Object |
getEntity(Object o) |
static Type |
getGenericResponseType(Method invoked,
Class<?> serviceCls,
Object targetObject,
Class<?> targetType,
Exchange exchange) |
static Method |
getGetterFromSetter(Method setter) |
static <T> Optional<javax.ws.rs.ext.ParamConverter<T>> |
getParamConverter(Class<T> pClass,
Type genericType,
Annotation[] anns,
Message message) |
static Map<Parameter,Class<?>> |
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 |
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,
Type genericType,
Annotation[] paramAnns,
ParameterType pType,
Message message) |
static void |
injectConstructorProxies(Object o,
AbstractResourceInfo cri,
Message m) |
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,
ProviderFactory factory) |
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 |
injectThroughMethod(Object requestObject,
Method method,
Object parameterValue,
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) |
public static boolean isConcreteClass(Class<?> cls)
public static Type getSuperType(Class<?> serviceClass, TypeVariable<?> var)
public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue)
public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue, Message inMessage)
public static Object extractFromMethod(Object requestObject, Method method, boolean logError)
public static <T> T handleParameter(String value, boolean decoded, Class<T> pClass, Type genericType, Annotation[] paramAnns, ParameterType pType, Message message)
public static <T> Optional<javax.ws.rs.ext.ParamConverter<T>> getParamConverter(Class<T> pClass, Type genericType, Annotation[] anns, Message message)
public static <T> T createFromParameterHandler(String value, Class<T> pClass, Type genericType, Annotation[] anns, Message message)
public static void reportServerError(String messageName, String parameter, boolean logError)
public static Object handleBean(Class<?> paramType, Annotation[] paramAnns, javax.ws.rs.core.MultivaluedMap<String,String> values, ParameterType pType, Message message, boolean decoded)
public static boolean isSupportedCollectionOrArray(Class<?> type)
public static Object createParameterObject(List<String> paramValues, Class<?> paramType, Type genericType, Annotation[] paramAnns, String defaultValue, boolean decoded, ParameterType pathParam, Message message)
public static <T> ThreadLocalProxy<T> createThreadLocalProxy(Class<T> type)
public static Method getGetterFromSetter(Method setter) throws Exception
Exception
public static void injectContextProxiesAndApplication(AbstractResourceInfo cri, Object instance, javax.ws.rs.core.Application app, ProviderFactory factory)
public static void injectContextProxies(AbstractResourceInfo cri, Object instance)
public static void injectContextField(AbstractResourceInfo cri, Field f, Object o, Object value)
public static void injectContexts(Object requestObject, AbstractResourceInfo resource, Message message)
public static void injectContextMethods(Object requestObject, AbstractResourceInfo cri, Message message)
public static void injectContextFields(Object o, AbstractResourceInfo cri, Message m)
public static void injectConstructorProxies(Object o, AbstractResourceInfo cri, Message m)
public static javax.ws.rs.core.MultivaluedMap<String,Object> extractValuesFromBean(Object bean, String baseName)
public static void fillInValuesFromBean(Object bean, String baseName, javax.ws.rs.core.MultivaluedMap<String,Object> values)
public static Map<Parameter,Class<?>> getParametersFromBeanClass(Class<?> beanClass, ParameterType type, boolean checkIgnorable)
public static boolean isPrimitive(Class<?> type)
public static boolean isPrimitiveOnly(Class<?> type)
public static String decodeValue(String value, boolean decode, ParameterType param)
public static Object convertStringToPrimitive(String value, Class<?> cls, Annotation[] anns)
public static Type getGenericResponseType(Method invoked, Class<?> serviceCls, Object targetObject, Class<?> targetType, Exchange exchange)
public static Class<?> updateParamClassToTypeIfNeeded(Class<?> paramCls, Type type)
public static Type processGenericTypeIfNeeded(Class<?> serviceCls, Class<?> paramCls, Type type)
Apache CXF