public Collection<Component> getFellows() { if (this instanceof IdSpace) return Collections.unmodifiableCollection(_auxinf.spaceInfo.fellows.values()); final IdSpace idspace = getSpaceOwner(); if (idspace != null) return idspace.getFellows(); return Collections.emptyList(); }
/** Injects the fellows in the context of the given IdSpace. */ public void wireFellows(final IdSpace idspace) { //inject fellows final Collection<Component> fellows = idspace.getFellows(); for (Component xcomp : fellows) injectFellow(xcomp); //inject space owner ancestors if (idspace instanceof Component) { for (IdSpace is = idspace;;) { final Component parent = is instanceof Component ? ((Component) is).getParent() : null; if (parent == null) { //hit page final Page page = ((Component) idspace).getPage(); if (page != null) injectFellow(page); break; } is = parent.getSpaceOwner(); injectFellow(is); } } else { injectFellow((Page) idspace); } }