List of utility methods to do XML JAXB Context
JAXBContext | getContext() Returns the JAXB context for XML parsing / generation. if (JAXB == null) initContext(Thread.currentThread().getContextClassLoader()); return JAXB; |
JAXBContext | getContext(Class> c) get Context JAXBContext jc = contextMap.get(c); if (jc == null) { jc = JAXBContext.newInstance(c); contextMap.put(c, jc); return jc; |
JAXBContext | getContext(Class> clazz) get Context JAXBContext context = CONTEXTS.get(clazz); if (context == null) { try { context = JAXBContext.newInstance(clazz); } catch (JAXBException e) { throw new RuntimeException("Failed to create JAXBContext for type " + clazz, e); CONTEXTS.put(clazz, context); ... |
JAXBContext | getContext(final Class> theClass) Gets the JAXBContext for the passed in class. if (serMap.containsKey(theClass)) { return serMap.get(theClass); } else { final JAXBContext jContext = JAXBContext.newInstance(theClass); serMap.put(theClass, jContext); return jContext; |
JAXBContext | getContext(String uddiVersion) get Context return JAXBContexts.get(uddiVersion);
|
JAXBContext | getContextFor(final Class> clazz) get Context For final JAXBContext context; if (m_contexts.containsKey(clazz)) { context = m_contexts.get(clazz); } else { context = JAXBContext.newInstance(clazz); m_contexts.put(clazz, context); return context; ... |
JAXBContext | getContextForNamespace(String namespace) get Context For Namespace String contextPath = namespaceToContextPath.get(namespace); if (contextPath == null) { contextPath = namespaceToContextPath.get(DEFAULT_NAMESPACE); return JAXBContext.newInstance(contextPath); |
String | getContextPath(Class>... classes) get Context Path if (classes == null) { throw new IllegalArgumentException("The validated object is null"); for (int i = 0; i < classes.length; i++) { if (classes[i] == null) { throw new IllegalArgumentException("The validated array contains null element at index: " + i); final StringBuilder contextPath = new StringBuilder(); for (int index = 0; index < classes.length; index++) { if (index > 0) { contextPath.append(':'); contextPath.append(classes[index].getPackage().getName()); return contextPath.toString(); |
JAXBContext | getCustomContext() get Custom Context return jaxbContext;
|
JAXBContext | getCustomIdentityJAXBContext() get Custom Identity JAXB Context initCustomJAXBContext();
return customjaxbContext;
|