/** * Extracts the namespace components from the specified argument list * (modifying the original list in place) and returns the namespace * components in its own namespace Args. * * @param args An argument list. Will be modified in place. * @return The namespace arguments from the original argument list. */ private static Args extractNamespaceFrom(Args args) { Args namespace = new Args(); for (String componentName : NAMESPACE_COMPONENT_NAMES) { if (args.containsKey(componentName)) { namespace.put(componentName, args.get(componentName).toString()); args.remove(componentName); } } return namespace; }