1 26 27 package org.objectweb.util.browser.plugin.java; 28 29 30 import org.objectweb.util.browser.api.Entry; 31 import org.objectweb.util.browser.core.naming.AbstractContext; 32 33 34 import java.util.Enumeration ; 35 import java.util.Properties ; 36 37 44 public class JavaPropertiesContext 45 extends AbstractContext { 46 47 53 54 private Properties properties_; 55 56 62 68 74 78 public Entry[] getEntries(){ 79 Entry[] entries = new Entry[properties_.size()]; 80 Enumeration keys, elements; 81 keys = properties_.keys(); 82 elements = properties_.elements(); 83 for (int i = 0; i < entries.length; i++) { 84 entries[i] = createEntry(elements.nextElement(),(String ) keys.nextElement()); 85 } 86 return entries; 87 } 88 89 95 101 public void setWrapped(Object object) { 102 properties_ = (Properties ) object; 103 } 104 105 111 public Object getWrapped() { 112 return properties_; 113 } 114 115 } 116 | Popular Tags |