List of utility methods to do XML JAXB Unmarshaller
T | castUnmarshalled(Object unmarshalled, Class cast Unmarshalled if (clazz.isInstance(unmarshalled)) { return clazz.cast(unmarshalled); } else if (unmarshalled instanceof JAXBElement) { return castUnmarshalled(((JAXBElement<?>) unmarshalled).getValue(), clazz); } else { throw new ClassCastException("Unmarshalled object is neither a " + clazz.getName() + " nor a " + JAXBElement.class.getName() + ": classname = " + unmarshalled.getClass().getName()); |
void | closeUnmarshaller(Unmarshaller u) close Unmarshaller if (u instanceof Closeable) { try { ((Closeable) u).close(); } catch (IOException e) { |
Unmarshaller | createUnmarshaller() create Unmarshaller return jxbc.createUnmarshaller();
|
Unmarshaller | createUnmarshaller() Create an unmarshaller for XML parsing. return getContext().createUnmarshaller();
|
Unmarshaller | createUnmarshaller() create Unmarshaller if (unmarshaller == null) { JAXBContext jaxbContext = JAXBContext.newInstance(Gml_NS); unmarshaller = jaxbContext.createUnmarshaller(); return unmarshaller; |
Unmarshaller | createUnmarshaller(Class jaxbBindClass) create Unmarshaller Unmarshaller unmarshaller = newJAXBContext(jaxbBindClass).createUnmarshaller();
return unmarshaller;
|
Unmarshaller | createUnmarshaller(Class> clazz) create Unmarshaller try { JAXBContext jaxbContext = getJaxbContext(clazz); return jaxbContext.createUnmarshaller(); } catch (JAXBException e) { throw new RuntimeException(e); |
Unmarshaller | createUnmarshaller(Class> clazz) create Unmarshaller JAXBContext context = JAXBContext.newInstance(clazz);
Unmarshaller unmarshaller = context.createUnmarshaller();
return unmarshaller;
|
Unmarshaller | createUnmarshaller(Class> clazz) Creates a unmarshaller for the given class. return getJAXBContext(clazz).createUnmarshaller();
|
Unmarshaller | createUnmarshaller(Object object) create Unmarshaller Class objectClass = object.getClass(); if (objectClass.getSimpleName().equals("Class")) { objectClass = (Class) object; JAXBContext context; Unmarshaller unmarshaller = null; try { context = JAXBContext.newInstance(objectClass); ... |