private static ClojureVersion getVersion(String versionName) { for (ClojureVersion version : ClojureVersion.values()) { if (versionName.equals(version.toString())) { return version; } } LOG.error("invalid Clojure version: " + versionName); return null; }
@NotNull public List<FrameworkVersion> getVersions() { List<FrameworkVersion> versions = new ArrayList<FrameworkVersion>(); for (ClojureVersion version : ClojureVersion.values()) { versions.add( new FrameworkVersion( version.toString(), getLibraryName(version.toString()), getLibraries(version.toString()))); ; } return versions; }
@NotNull protected LibraryInfo[] getLibraries(final String selectedVersion) { ClojureVersion version = getVersion(selectedVersion); LOG.assertTrue(version != null); return version.getJars(); }