Probably a simple
| public List<BeanMetaData> getBeans()
| {
| List<BeanMetaData> allBeans = new ArrayList<BeanMetaData>();
| addBeans(this, allBeans);
| return allBeans;
| }
|
| protected void addBeans(MetaDataVisitorNode current, List<BeanMetaData>
list)
| {
| for(Iterator<? extends MetaDataVisitorNode> children =
current.getChildren(); children != null && children.hasNext();)
| {
| MetaDataVisitorNode next = children.next();
| if (next instanceof BeanMetaDataFactory)
| {
| list.addAll(((BeanMetaDataFactory) next).getBeans());
| }
| else
| {
| addBeans(next, list);
| }
| }
| if (current instanceof BeanMetaData)
| {
| list.add((BeanMetaData) current);
| }
| }
|
will do. ;-)
I also made ClassLoaderMetaData as BeanMetaDataFactory.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968589#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...