1 26 27 package org.objectweb.util.explorer.plugin.java; 28 29 import java.util.Enumeration ; 30 import java.util.Properties ; 31 32 import org.objectweb.util.explorer.api.Context; 33 import org.objectweb.util.explorer.api.Entry; 34 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 35 36 43 public class JavaPropertiesContext 44 implements Context 45 { 46 47 53 59 65 71 74 public Entry[] getEntries(Object object){ 75 Properties properties = (Properties )object; 76 Entry[] entries = new Entry[properties.size()]; 77 Enumeration keys, elements; 78 keys = properties.keys(); 79 elements = properties.elements(); 80 for (int i = 0; i < entries.length; i++) { 81 entries[i] = new DefaultEntry((String ) keys.nextElement(),elements.nextElement()); 82 } 83 return entries; 84 } 85 86 } 87 | Popular Tags |