Package org.apache.cxf.jaxrs.utils
Class ResourceUtils
java.lang.Object
org.apache.cxf.jaxrs.utils.ResourceUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic JAXRSServerFactoryBean
createApplication
(jakarta.ws.rs.core.Application app, boolean ignoreAppPath, boolean staticSubresourceResolution, boolean useSingletonResourceProvider, org.apache.cxf.Bus bus) static ClassResourceInfo
createClassResourceInfo
(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic) static ClassResourceInfo
createClassResourceInfo
(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic, org.apache.cxf.Bus bus) static ClassResourceInfo
createClassResourceInfo
(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus) static ClassResourceInfo
createClassResourceInfo
(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus, List<jakarta.ws.rs.core.MediaType> defaultConsumes, List<jakarta.ws.rs.core.MediaType> defaultProduces) static ClassResourceInfo
createClassResourceInfo
(Map<String, UserResource> resources, UserResource model, Class<?> defaultClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus) static Object[]
createConstructorArguments
(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest) static Object[]
createConstructorArguments
(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>, Object> contextValues) static Object[]
createConstructorArguments
(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>, Object> contextValues, Class<?>[] params, Annotation[][] anns, Type[] genericTypes) static org.apache.cxf.feature.Feature
createFeatureInstance
(Class<? extends org.apache.cxf.feature.Feature> cls) static Object
createProviderInstance
(Class<?> cls) static ClassResourceInfo
createServiceClassResourceInfo
(Map<String, UserResource> resources, UserResource model, Class<?> sClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus) static Method
findPostConstructMethod
(Class<?> c) static Method
findPostConstructMethod
(Class<?> c, String name) static Method
findPreDestroyMethod
(Class<?> c) static Method
findPreDestroyMethod
(Class<?> c, String name) static Constructor<?>
findResourceConstructor
(Class<?> resourceClass, boolean perRequest) static Class<?>
getActualJaxbType
(Class<?> type, Method resourceMethod, boolean inbound) static ResourceTypes
getAllRequestResponseTypes
(List<ClassResourceInfo> cris, boolean jaxbOnly) static ResourceTypes
getAllRequestResponseTypes
(List<ClassResourceInfo> cris, boolean jaxbOnly, jakarta.ws.rs.ext.MessageBodyWriter<?> jaxbWriter) static InputStream
getClasspathResourceStream
(String path, Class<?> callingClass, org.apache.cxf.Bus bus) static URL
getClasspathResourceURL
(String path, Class<?> callingClass, org.apache.cxf.Bus bus) static Parameter
getParameter
(int index, Annotation[] anns, Class<?> type) getParameters
(Method resourceMethod) static <T> T
getResource
(String path, Class<T> resourceClass, org.apache.cxf.Bus bus) static List<UserResource>
getResourcesFromElement
(Element modelEl) static InputStream
getResourceStream
(String loc, org.apache.cxf.Bus bus) static URL
getResourceURL
(String loc, org.apache.cxf.Bus bus) static List<UserResource>
static List<UserResource>
getUserResources
(String loc) static List<UserResource>
getUserResources
(String loc, org.apache.cxf.Bus bus) static boolean
isValidResourceClass
(Class<?> c) static Properties
loadProperties
(String propertiesLocation, org.apache.cxf.Bus bus) static jakarta.ws.rs.ApplicationPath
locateApplicationPath
(Class<?> appClass)
-
Method Details
-
findPostConstructMethod
-
findPostConstructMethod
-
findPreDestroyMethod
-
findPreDestroyMethod
-
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Map<String, UserResource> resources, UserResource model, Class<?> defaultClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus) -
createServiceClassResourceInfo
public static ClassResourceInfo createServiceClassResourceInfo(Map<String, UserResource> resources, UserResource model, Class<?> sClass, boolean isRoot, boolean enableStatic, org.apache.cxf.Bus bus) -
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic) -
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, boolean root, boolean enableStatic, org.apache.cxf.Bus bus) -
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus) -
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass, Class<?> sClass, ClassResourceInfo parent, boolean root, boolean enableStatic, org.apache.cxf.Bus bus, List<jakarta.ws.rs.core.MediaType> defaultConsumes, List<jakarta.ws.rs.core.MediaType> defaultProduces) -
findResourceConstructor
-
getParameters
-
getParameter
-
getUserResources
-
getResourceStream
- Throws:
IOException
-
getResourceURL
- Throws:
IOException
-
getClasspathResourceStream
public static InputStream getClasspathResourceStream(String path, Class<?> callingClass, org.apache.cxf.Bus bus) -
getClasspathResourceURL
-
getResource
-
loadProperties
public static Properties loadProperties(String propertiesLocation, org.apache.cxf.Bus bus) throws IOException - Throws:
IOException
-
getUserResources
-
getUserResources
- Throws:
Exception
-
getResourcesFromElement
-
getAllRequestResponseTypes
public static ResourceTypes getAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly) -
getAllRequestResponseTypes
public static ResourceTypes getAllRequestResponseTypes(List<ClassResourceInfo> cris, boolean jaxbOnly, jakarta.ws.rs.ext.MessageBodyWriter<?> jaxbWriter) -
getActualJaxbType
-
createConstructorArguments
public static Object[] createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest) -
createConstructorArguments
public static Object[] createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>, Object> contextValues) -
createConstructorArguments
public static Object[] createConstructorArguments(Constructor<?> c, org.apache.cxf.message.Message m, boolean perRequest, Map<Class<?>, Object> contextValues, Class<?>[] params, Annotation[][] anns, Type[] genericTypes) -
createApplication
public static JAXRSServerFactoryBean createApplication(jakarta.ws.rs.core.Application app, boolean ignoreAppPath, boolean staticSubresourceResolution, boolean useSingletonResourceProvider, org.apache.cxf.Bus bus) -
createProviderInstance
-
createFeatureInstance
public static org.apache.cxf.feature.Feature createFeatureInstance(Class<? extends org.apache.cxf.feature.Feature> cls) -
isValidResourceClass
-
locateApplicationPath
-