DownloadableLibraryDescription (CustomLibraryDescription libraryDescription) { final DownloadableLibraryType type = libraryDescription.getDownloadableLibraryType(); if (type != null) return type.getLibraryDescription(); if (libraryDescription instanceof OldCustomLibraryDescription) { return ((OldCustomLibraryDescription)libraryDescription).getDownloadableDescription(); } return null; }