1 26 27 package org.objectweb.util.explorer.plugin.java.reflect; 28 29 import java.util.List ; 30 import java.util.Map ; 31 import java.util.Vector ; 32 33 import org.objectweb.util.explorer.api.Context; 34 import org.objectweb.util.explorer.api.Entry; 35 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 36 37 45 public class TreeInheritanceContext 46 implements Context 47 { 48 49 55 56 protected static Map config_; 57 58 59 public static final String DEFAULT_CONFIG = "_default_config_"; 60 61 67 73 79 82 public Entry[] getEntries(Object object) { 83 TreeInheritance treeInheritance = (TreeInheritance)object; 84 List entryList = new Vector (); 85 Class class_ = treeInheritance._getClass(); 86 Class superClass = class_.getSuperclass(); 87 if(superClass!=null){ 88 entryList.add(new DefaultEntry(superClass.getName(),superClass)); 89 } 90 Class [] interfaces = class_.getInterfaces(); 91 for (int i = 0; i < interfaces.length; i++) { 92 entryList.add(new DefaultEntry(interfaces[i].getName(),interfaces[i])); 93 } 94 return (Entry[])entryList.toArray(new Entry[0]); 95 } 96 97 } | Popular Tags |