@Provider public class EnunciateJAXBContextResolver extends Object implements javax.ws.rs.ext.ContextResolver<JAXBContext>
| Constructor and Description |
|---|
EnunciateJAXBContextResolver() |
| Modifier and Type | Method and Description |
|---|---|
JAXBContext |
getContext(Class<?> objectType) |
static ClassLoader |
getDefaultClassLoader()
Return the default ClassLoader to use: typically the thread context
ClassLoader, if available; the ClassLoader that loaded the EnunciateJAXBContextResolver
class will be used as fallback.
|
protected Class |
loadClass(String classname)
Loads a class from the classpath.
|
protected Object |
loadPrefixMapper() |
protected InputStream |
loadResource(String resource)
Loads a resource from the classpath.
|
Set<Class> |
loadTypes() |
protected Object loadPrefixMapper()
public static ClassLoader getDefaultClassLoader()
Call this method if you intend to use the thread context ClassLoader
in a scenario where you absolutely need a non-null ClassLoader reference:
for example, for class path resource loading (but not necessarily for
Class.forName, which accepts a null ClassLoader
reference as well).
null)Thread.getContextClassLoader()protected InputStream loadResource(String resource)
resource - The resource to load.protected Class loadClass(String classname) throws ClassNotFoundException
classname - The class name.ClassNotFoundExceptionpublic JAXBContext getContext(Class<?> objectType)
getContext in interface javax.ws.rs.ext.ContextResolver<JAXBContext>Copyright © 2016. All rights reserved.