1 28 29 package org.objectweb.fractal.explorer.context; 30 31 import java.util.List ; 32 import java.util.Vector ; 33 34 import org.objectweb.fractal.api.Component; 35 import org.objectweb.fractal.api.Interface; 36 import org.objectweb.fractal.api.control.ContentController; 37 import org.objectweb.fractal.explorer.FcExplorer; 38 import org.objectweb.util.explorer.api.Context; 39 import org.objectweb.util.explorer.api.Entry; 40 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 41 42 47 public class ContentControllerContext 48 implements Context 49 { 50 56 62 68 74 78 public Entry[] getEntries(Object object) { 79 ContentController cc = (ContentController)object; 80 Object [] ir = cc.getFcInternalInterfaces(); 81 Component[] ci = cc.getFcSubComponents(); 82 List l = new Vector (); 83 int cpt = 0; 84 for (int i = 0; i < ir.length; i++) { 86 Interface itf = (Interface) ir[i]; 87 l.add(new DefaultEntry(FcExplorer.getName(itf), InterfaceWrapperFactory.singleton.getWrapper(itf))); 88 cpt = cpt + 1 ; 89 } 90 91 for (int i = 0 ; i < ci.length ; i++){ 93 l.add(new DefaultEntry(FcExplorer.getName(ci[i]), ci[i])); 94 cpt = cpt + 1 ; 95 } 96 return (Entry[])l.toArray(new Entry[0]); 97 } 98 99 } 100 | Popular Tags |