code: static <T> T doWithMainClasses(JarFile jarFile, String classesLocation,
  			MainClassCallback<T> callback) throws IOException {
  		List<JarEntry> classEntries = getClassEntries(jarFile, classesLocation);
  		classEntries.sort(new ClassEntryComparator());
  		for (JarEntry entry : classEntries) {
  			try (InputStream inputStream = new BufferedInputStream(
  					jarFile.getInputStream(entry))) {
  				ClassDescriptor classDescriptor = createClassDescriptor(inputStream);
  				if (classDescriptor != null && classDescriptor.isMainMethodFound()) {
  					String className = convertToClassName(entry.getName(),
  							classesLocation);
  					T result = callback.doWith(new MainClass(className,
  							classDescriptor.getAnnotationNames()));
  					if (result != null) {
  						return result;
  					}
  				}
  			}
  		}
  		return null;
  	}
docs: Perform the given callback operation on all main classes from the given jar.
  @param <T> the result type
  @param jarFile the jar file to search
  @param classesLocation the location within the jar containing classes
  @param callback the callback
  @return the first callback result or {@code null}
  @throws IOException in case of I/O errors