Class MainClassFinder


  • public class MainClassFinder
    extends java.lang.Object
    Finds main classes in a list of class files. Main classes are classes that define the public static void main(String[] args) method.
    • Constructor Detail

      • MainClassFinder

        public MainClassFinder()
    • Method Detail

      • find

        public static MainClassFinder.Result find​(java.util.List<java.nio.file.Path> files,
                                                  java.util.function.Consumer<LogEvent> logger)
        Tries to find classes with psvm (see class javadoc) in files.
        Parameters:
        files - the files to search
        logger - a Consumer used to handle log events
        Returns:
        the MainClassFinder.Result of the main class finding attempt