1 package eu.svjatoslav.inspector.java;
3 import eu.svjatoslav.inspector.java.structure.ClassGraph;
6 import java.net.MalformedURLException;
8 import java.net.URLClassLoader;
10 import static java.io.File.separator;
11 import static java.lang.System.getProperty;
14 * This class acts as a commandline interface for JavaInspect.
17 public static void main(String[] args) throws MalformedURLException, ClassNotFoundException {
18 CommandlineConfiguration commandlineConfiguration = new CommandlineConfiguration(args);
19 System.out.println("Commandline config validated");
21 File jarFile = commandlineConfiguration.jarFile.getValue();
23 URLClassLoader classLoader = new URLClassLoader(
24 new URL[]{jarFile.toURL()},
25 commandlineConfiguration.getClass().getClassLoader());
27 Class classToLoad = Class.forName("eu.svjatoslav.sixth.e3d.gui.GuiComponent", true, classLoader);
30 ClassGraph cg = new ClassGraph();
31 cg.setTargetDirectoryPath(getProperty("user.dir") + separator);
33 // cg.addProject(projectDir);
34 // cg.whitelistClassGlob(packageGlob);
35 cg.setKeepDotFile(true);
37 cg.generateGraph(commandlineConfiguration.graphName.getValue());