if (metadata instanceof BeanMetadata) {
BeanMetadata bmd = (BeanMetadata) metadata;
processingStack.add("Bean named " + bmd.getId() + "->");
return processBeanMetadata(bmd);
} else if (metadata instanceof ReferenceListMetadata) {
ReferenceListMetadata rlmd = (ReferenceListMetadata) metadata;
processingStack.add("Reference List named " + rlmd.getId() + "->");
return processRefCollectionMetadata(rlmd);
} else if (metadata instanceof ReferenceMetadata) {
ReferenceMetadata rmd = (ReferenceMetadata) metadata;
processingStack.add("Reference named " + rmd.getId() + "->");
return processReferenceMetadata(rmd);