if(null == eventReader || null == javaClass) {
throw new IllegalArgumentException();
}
try {
Class classToUnmarshalTo = getClassToUnmarshalTo(javaClass);
XMLEventReaderReader staxReader = new XMLEventReaderReader(xmlUnmarshaller);
XMLEventReaderInputSource inputSource = new XMLEventReaderInputSource(eventReader);
JAXBElement unmarshalled = buildJAXBElementFromObject(xmlUnmarshaller.unmarshal(staxReader, inputSource, classToUnmarshalTo), javaClass);
if(classToUnmarshalTo != javaClass){
JAXBElement returnVal = new JAXBElement(unmarshalled.getName(), javaClass, unmarshalled.getScope(), unmarshalled.getValue());