Object[] children = super.getChildren();
for (Object child : children) {
if (child instanceof RequestMappingAnnotationMetadata) {
Set<BeanMetadataNode> childNodes = nodes;
BeanMetadataNode parent = null;
RequestMappingAnnotationMetadata metadata = (RequestMappingAnnotationMetadata) child;
// Check if there is a class level RequestMapping defined. If so install a class
// level meta data node.
if (metadata.getValue() != null) {
parent = new BeanMetadataNode(metadata.getHandleIdentifier());
IType type = (IType) JavaCore.create(metadata.getClassHandle());
parent.setLabel(metadata.getValueAsText()
+ BeansUIPlugin.getLabelProvider().getText(type));
parent.setImage(BeansUIPlugin.getLabelProvider().getImage(type));
parent.setLocation(metadata.getElementSourceLocation());
nodes.add(parent);
childNodes = new LinkedHashSet<BeanMetadataNode>();
}
// Install a meta data node for every method level RequestMappings
for (IMethodMetadata mmd : metadata.getMethodMetaData()) {
RequestMappingMethodAnnotationMetadata requestMapping = (RequestMappingMethodAnnotationMetadata) mmd;
IMethod method = (IMethod) JdtUtils.getByHandle(requestMapping.getMethodHandle());
BeanMetadataNode node = new BeanMetadataNode(requestMapping.getMethodHandle());
node.setLabel(requestMapping.getValueAsText()