org.apache.cxf.jaxrs.utils
Class ResourceUtils
java.lang.Object
org.apache.cxf.jaxrs.utils.ResourceUtils
public final class ResourceUtils
- extends Object
Method Summary |
static JAXRSServerFactoryBean |
createApplication(javax.ws.rs.core.Application app,
boolean ignoreAppPath)
|
static ClassResourceInfo |
createClassResourceInfo(Class<?> rClass,
Class<?> sClass,
boolean root,
boolean enableStatic)
|
static ClassResourceInfo |
createClassResourceInfo(Map<String,UserResource> resources,
UserResource model,
boolean isRoot,
boolean enableStatic)
|
static Object[] |
createConstructorArguments(Constructor c,
Message m)
|
static javax.xml.bind.JAXBContext |
createJaxbContext(Set<Class<?>> classes,
Class[] extraClass,
Map<String,Object> contextProperties)
|
static ClassResourceInfo |
createServiceClassResourceInfo(Map<String,UserResource> resources,
UserResource model,
Class<?> sClass,
boolean isRoot,
boolean enableStatic)
|
static Method |
findPostConstructMethod(Class<?> c)
|
static Method |
findPreDestroyMethod(Class<?> c)
|
static Constructor |
findResourceConstructor(Class<?> resourceClass,
boolean perRequest)
|
static Class<?> |
getActualJaxbType(Class<?> type,
Method resourceMethod,
boolean inbound)
|
static Map<Class<?>,Type> |
getAllRequestResponseTypes(List<ClassResourceInfo> cris,
boolean jaxbOnly)
|
static InputStream |
getClasspathResourceStream(String path,
Class<?> callingClass,
Bus bus)
|
static URL |
getClasspathResourceURL(String path,
Class<?> callingClass,
Bus bus)
|
static Parameter |
getParameter(int index,
Annotation[] anns,
Class<?> type)
|
static List<Parameter> |
getParameters(Method resourceMethod)
|
static
|
getResource(String path,
Class<T> resourceClass,
Bus bus)
|
static List<UserResource> |
getResourcesFromElement(Element modelEl)
|
static InputStream |
getResourceStream(String loc,
Bus bus)
|
static URL |
getResourceURL(String loc,
Bus bus)
|
static List<UserResource> |
getUserResources(InputStream is)
|
static List<UserResource> |
getUserResources(String loc)
|
static List<UserResource> |
getUserResources(String loc,
Bus bus)
|
static boolean |
isValidResourceClass(Class<?> c)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
findPostConstructMethod
public static Method findPostConstructMethod(Class<?> c)
findPreDestroyMethod
public static Method findPreDestroyMethod(Class<?> c)
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Map<String,UserResource> resources,
UserResource model,
boolean isRoot,
boolean enableStatic)
createServiceClassResourceInfo
public static ClassResourceInfo createServiceClassResourceInfo(Map<String,UserResource> resources,
UserResource model,
Class<?> sClass,
boolean isRoot,
boolean enableStatic)
createClassResourceInfo
public static ClassResourceInfo createClassResourceInfo(Class<?> rClass,
Class<?> sClass,
boolean root,
boolean enableStatic)
findResourceConstructor
public static Constructor findResourceConstructor(Class<?> resourceClass,
boolean perRequest)
getParameters
public static List<Parameter> getParameters(Method resourceMethod)
getParameter
public static Parameter getParameter(int index,
Annotation[] anns,
Class<?> type)
getUserResources
public static List<UserResource> getUserResources(String loc,
Bus bus)
getResourceStream
public static InputStream getResourceStream(String loc,
Bus bus)
throws Exception
- Throws:
Exception
getResourceURL
public static URL getResourceURL(String loc,
Bus bus)
throws Exception
- Throws:
Exception
getClasspathResourceStream
public static InputStream getClasspathResourceStream(String path,
Class<?> callingClass,
Bus bus)
getClasspathResourceURL
public static URL getClasspathResourceURL(String path,
Class<?> callingClass,
Bus bus)
getResource
public static <T> T getResource(String path,
Class<T> resourceClass,
Bus bus)
getUserResources
public static List<UserResource> getUserResources(String loc)
getUserResources
public static List<UserResource> getUserResources(InputStream is)
throws Exception
- Throws:
Exception
getResourcesFromElement
public static List<UserResource> getResourcesFromElement(Element modelEl)
getAllRequestResponseTypes
public static Map<Class<?>,Type> getAllRequestResponseTypes(List<ClassResourceInfo> cris,
boolean jaxbOnly)
getActualJaxbType
public static Class<?> getActualJaxbType(Class<?> type,
Method resourceMethod,
boolean inbound)
createConstructorArguments
public static Object[] createConstructorArguments(Constructor c,
Message m)
createApplication
public static JAXRSServerFactoryBean createApplication(javax.ws.rs.core.Application app,
boolean ignoreAppPath)
isValidResourceClass
public static boolean isValidResourceClass(Class<?> c)
createJaxbContext
public static javax.xml.bind.JAXBContext createJaxbContext(Set<Class<?>> classes,
Class[] extraClass,
Map<String,Object> contextProperties)
Apache CXF