AntClasspathEntry (Element dataElement) { String pathUrl = dataElement.getAttributeValue(SinglePathEntry.PATH); if (pathUrl != null) { return new SinglePathEntry(PathUtil.toPresentableUrl(pathUrl)); } String dirUrl = dataElement.getAttributeValue(AllJarsUnderDirEntry.DIR); if (dirUrl != null) { return new AllJarsUnderDirEntry(PathUtil.toPresentableUrl(dirUrl)); } throw new IllegalStateException(); }