Open-Source tool in Java to parse source code to automatically draw UML class Diagram using PlantUML
You can easily integrate PlantUML Dependency with your own code by adding PlantUML Dependency Jars in your classpath.
You have several choices to integrate PlantUML Dependency in your classpath :
<dependencies> <dependency> <groupId>net.sourceforge.plantuml-depend</groupId> <artifactId>plantuml-dependency-cli</artifactId> <version>1.4.0</version> </dependency> </dependencies>
import java.net.MalformedURLException; import java.text.ParseException; import net.sourceforge.plantumldependency.cli.main.program.PlantUMLDependencyProgram; import net.sourceforge.plantumldependency.commoncli.command.CommandLine; import net.sourceforge.plantumldependency.commoncli.command.impl.CommandLineImpl; import net.sourceforge.plantumldependency.commoncli.exception.CommandLineException; import net.sourceforge.plantumldependency.commoncli.program.JavaProgram; import net.sourceforge.plantumldependency.commoncli.program.execution.JavaProgramExecution; public class Main { public static void main(final String[] args) throws MalformedURLException, CommandLineException, ParseException { // Creates the PlantUML Dependency arguments as they would be written in the command line final CommandLine commandLineArguments = new CommandLineImpl(new String[] {"-o", "plantuml-jdk-1.7.0.51.txt", "-b", "C:\\jdk-1.7.0.51-src", "-e", "**/package-info.java"}); // Creates the PlantUML Dependency program instance final JavaProgram plantumlDependencyProgram = new PlantUMLDependencyProgram(); // Get the PlantUML Dependency program execution instance following the command line arguments, ready to be executed final JavaProgramExecution plantumlDependencyProgramExecution = plantumlDependencyProgram.parseCommandLine(commandLineArguments); // Executes the PlantUML Dependency program plantumlDependencyProgramExecution.execute(); } }
OuputStream
result once the program is executed
yet, it can only write into an output file for the moment (opened feature 28).