* Returns the inner {@link IBean}s of a given {@link IModelElement}.
* @since 2.1.0
*/
public static Set<IBean> getInnerBeans(final IModelElement element, final boolean recursive) {
final Set<IBean> innerBeans = new HashSet<IBean>();
IModelElementVisitor visitor = new IModelElementVisitor() {
public boolean visit(IModelElement visitedElement, IProgressMonitor monitor) {
if (!element.equals(visitedElement) && visitedElement instanceof IBean
&& ((IBean) visitedElement).isInnerBean()) {
innerBeans.add((IBean) visitedElement);
return recursive;