Here you can find the source of getRootElementName(Class> clazz)
static String getRootElementName(Class<?> clazz)
//package com.java2s; //License from project: Apache License import javax.xml.bind.annotation.XmlRootElement; public class Main { private static final String DEFAULT_NAME = "##default"; static String getRootElementName(Class<?> clazz) { XmlRootElement element = (XmlRootElement) clazz .getAnnotation(XmlRootElement.class); return !DEFAULT_NAME.equals(element.name()) ? element.name() : clazz.getSimpleName(); }//from w ww. ja va 2 s . c om }