/** * Return list of all property names. This is an expensive * operation: ON EACH CALL it walks through all property lists * associated with the current context class loader upto * and including the bootstrap class loader. * * @return The list of all property names */ public static Enumeration<String> propertyNames() { Map<String, Value> allProps = new Hashtable<String, Value>(); ClassLoader classLoader = getThreadContextClassLoader(); /** * Order doesn't matter, we are only going to use * the set of all keys... */ while (true) { Map<String, Value> properties = null; synchronized (propertiesCache) { properties = propertiesCache.get(classLoader); } if (properties != null) { allProps.putAll(properties); } if (classLoader == null) { break; } classLoader = getParent(classLoader); } return Collections.enumeration(allProps.keySet()); }
value = getValueProperty(getParent(classLoader), propertyName);