arbitraryAttrs.put(key, exportPackage.getAttribute(key));
Object putValue = value; if (ATTR_TYPE_STRING.equals(type)) putValue = value; else if (ATTR_TYPE_DOUBLE.equals(type)) putValue = new Double(value); else if (ATTR_TYPE_LONG.equals(type)) putValue = new Long(value); else if (ATTR_TYPE_URI.equals(type)) try { Class uriClazz = Class.forName("java.net.URI"); Constructor constructor = uriClazz.getConstructor(new Class[] {String.class}); putValue = constructor.newInstance(new Object[] {value}); } catch (ClassNotFoundException e) {  putValue = value; } catch (Exception e) { if (e instanceof RuntimeException) throw (RuntimeException) e; throw new RuntimeException(e.getMessage()); } else if (ATTR_TYPE_VERSION.equals(type)) putValue = new Version(value); else if (ATTR_TYPE_SET.equals(type)) putValue = ManifestElement.getArrayFromList(value, ","); arbitraryAttrs.put(key, putValue);
	private static Map getAttributes(ManifestElement exportPackage, String[] definedAttrs) {		Enumeration keys = exportPackage.getKeys();		Map arbitraryAttrs = null;		if (keys == null)			return null;		while (keys.hasMoreElements()) {			boolean definedAttr = false;			String key = (String) keys.nextElement();			for (int i = 0; i < definedAttrs.length; i++) {				if (definedAttrs[i].equals(key)) {					definedAttr = true;					break;				}			}			if (!definedAttr) {				if (arbitraryAttrs == null)					arbitraryAttrs = new HashMap();				arbitraryAttrs.put(key, exportPackage.getAttribute(key));			}		}		return arbitraryAttrs;	}