Class InjectionUtils


  • public final class InjectionUtils
    extends Object
    • Field Detail

      • STANDARD_CONTEXT_CLASSES

        public static final Set<String> STANDARD_CONTEXT_CLASSES
      • VALUE_CONTEXTS

        public static final Set<String> VALUE_CONTEXTS
    • Method Detail

      • getDeclaredField

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

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

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

        public static void injectFieldValue​(Field f,
                                            Object o,
                                            Object v)
      • 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,
                                               Message inMessage)
      • extractFromMethod

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

        public static Object extractFromMethod​(Object requestObject,
                                               Method method,
                                               boolean logError)
      • getParamConverter

        public static <T> Optional<javax.ws.rs.ext.ParamConverter<T>> getParamConverter​(Class<T> pClass,
                                                                                        Type genericType,
                                                                                        Annotation[] anns,
                                                                                        Message message)
      • createFromParameterHandler

        public static <T> T createFromParameterHandler​(String value,
                                                       Class<T> pClass,
                                                       Type genericType,
                                                       Annotation[] anns,
                                                       Message message)
      • reportServerError

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

        public static void reportServerError​(String messageName,
                                             String parameter,
                                             boolean logError)
      • isSupportedCollectionOrArray

        public static boolean isSupportedCollectionOrArray​(Class<?> type)
      • createThreadLocalProxy

        public static <T> ThreadLocalProxy<T> createThreadLocalProxy​(Class<T> type)
      • 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)
      • isPrimitive

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

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

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

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

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

        public static Type getGenericResponseType​(Method invoked,
                                                  Class<?> serviceCls,
                                                  Object targetObject,
                                                  Class<?> targetType,
                                                  Exchange exchange)
      • updateParamClassToTypeIfNeeded

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

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