* @return unmarshalled object from element
* @throws JiBXException on any error (possibly wrapping other exception)
*/
public Object unmarshalElement(Class clas) throws JiBXException {
String name = toStart();
IUnmarshaller unmarshal =
getUnmarshaller(m_reader.getNamespace(), name);
if (unmarshal == null) {
throw new JiBXException("No unmarshaller for element " +
currentNameString() + " " + buildPositionString());
} else {
Object obj = unmarshal.unmarshal(null, this);
if (!clas.isInstance(obj)) {
throw new JiBXException("Element " + name +
" not compatible with expected type " + clas.getName() +
" " + buildPositionString());
}