code: public static String getName(Object obj) {
  		try {
  			return obj.getClass().getAnnotation(XmlRootElement.class).name();
  		} catch (NullPointerException e) {
  			return obj.getClass().getAnnotation(XmlType.class).name();
  		}
  	}
docs: Return the name from the JAXB model object.
  
  @param obj
  Expects a JAXB model object.
  @return element name