private <T extends Serializable> QName getXmlType(Class<T> clazz)
      throws IllegalArgumentException,
      IllegalAccessException,
      InvocationTargetException,
      SecurityException,
      NoSuchMethodException {
    Method getTypeDesc = clazz.getMethod("getTypeDesc");
    TypeDesc typeDesc = (TypeDesc) getTypeDesc.invoke(null);
    return typeDesc.getXmlType();
  }
private < T extends Serializable > QName getXmlType ( Class < T > clazz ) throws IllegalArgumentException , IllegalAccessException , InvocationTargetException , SecurityException , NoSuchMethodException { Method getTypeDesc = clazz . getMethod ( "getTypeDesc" ) ; TypeDesc typeDesc = ( TypeDesc ) getTypeDesc . invoke ( null ) ; return typeDesc . getXmlType ( ) ; }
Uses reflection to get the QName XmlType.