1 26 27 package org.objectweb.openccm.explorer.CORBA; 28 29 import org.objectweb.util.explorer.api.Context; 30 import org.objectweb.util.explorer.api.Entry; 31 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 32 33 40 public class CORBAContext 41 extends CORBAAttributes 42 implements Context { 43 44 50 56 62 68 public Entry[] getEntries(Object object) { 69 org.omg.CORBA.Object object_ = (org.omg.CORBA.Object )object; 70 java.util.Vector v = new java.util.Vector (); 71 for(int i=0 ; i<attributesName_.length ; i++){ 72 if(exists(attributesName_[i],object_)){ 73 String name = attributesName_[i]; 74 try{ 75 Object returnValue = object_.getClass().getMethod(name,null).invoke(object_,null); 76 String value = returnValue!=null?returnValue.toString():null; 77 v.add(new DefaultEntry(attributesName_[i] + ": " + value, new ViewAttributeWrapper(attributesName_[i],object_))); 78 } catch(Exception e) { 79 ConsoleFactory.getDebugConsole().add("[" + getClass().getName() + "] " + name + "() method not found!\n"); 80 } 81 82 } 83 } 84 return (Entry[]) v.toArray(new Entry[0]); 85 } 86 87 } | Popular Tags |