code: static void checkForDownloads(InstanceType instanceType, boolean checkTimeStamp, boolean cleanup) {
          LOGGER.entering();
  
          if (checkTimeStamp && (lastModifiedTime == DOWNLOAD_FILE.lastModified())) {
              return;
          }
          lastModifiedTime = DOWNLOAD_FILE.lastModified();
  
          if (cleanup) {
              cleanup();
          }
  
          List<URLChecksumEntity> artifactDetails = new ArrayList<ArtifactDetails.URLChecksumEntity>();
  
          try {
              artifactDetails = ArtifactDetails.getArtifactDetailsForCurrentPlatformByRole(DOWNLOAD_FILE, instanceType);
          } catch (IOException e) {
              LOGGER.log(Level.SEVERE, "Unable to open download.json file", e);
              throw new RuntimeException(e);
          }
  
          downloadAndExtractArtifacts(artifactDetails);
          LOGGER.exiting();
      }
docs: Check download.json and download files based on {@link InstanceType}
  
  @param instanceType
  the {@link InstanceType} to process downlaods for
  @param checkTimeStamp
  whether to check the last modified time stamp of the downlaod.json file. Returns immediately on
  subsequent calls if <code>true</code> and last modified is unchanged.
  @param cleanup
  whether to cleanup previous downloads from a previous call to
  checkForDownloads in the same JVM