*/
protected void addReferencedTypeDefinitions(ResourceMethod resourceMethod) {
REFERENCE_STACK.get().addFirst("\"see also\" annotation");
addSeeAlsoTypeDefinitions(resourceMethod);
REFERENCE_STACK.get().removeFirst();
ResourceEntityParameter ep = resourceMethod.getEntityParameter();
if (ep != null) {
REFERENCE_STACK.get().addFirst("entity parameter " + ep.getSimpleName());
TypeMirror type = ep.getType();
if (type instanceof ClassType) {
ClassDeclaration classDeclaration = ((ClassType) type).getDeclaration();
if (classDeclaration != null) {
if (classDeclaration.getAnnotation(XmlRootElement.class) != null) {
//only add referenced type definitions for root elements.