Parse C++ and Java files and generate class diagram as HTML, GraphViz or Text


Samples of output:

Download source code C++ on Github:
Source code is currently C++, compiles on both Linux, Mac and Windows.
Plan to make a Java version available soon

Download Executables:

[To Home Page]

Parse C++ and Java source files and produce class relationship as HTML, GraphViz or Text file

LLClasses help banner

llclasses (v2.1)

Des: Generate class dependence tree (Mar 13 2019) By: LanDen Labs Use: llclasses [-+ntgxshjz] header_files...

Switches (*=default)(-=off, +=on): n ; Show alphabetic class name list * t ; Show class dependency tree

Output format (single choice): * g ; Use graphics for tree connections x ; Use (+|-) for tree connections s ; Use spaces for tree connections h ; Html tree connections (needs images 0.png, 1.png, 2.png, n.png) j ; Java tree connections (needs dtree z ; GraphViz (see

With -j to customize java 1=header, 2=body begin, 3=body end Specify file which contains html text to insert in output -1=head.html -2=bodybegin.html -3=bodyend.html Optional replacement words applied to html sections -0=x1,foo1 -0=x2,foo2 -0=x3,foo3

Modifiers: Z ; Split GraphViz by tree, use with -O N =nodesPerFile ; Split by nodes per file, use with -O O =outpath ; Save output in file T =tabular ; Tabular html V =filePattern ; Ignore file path pattern, ex *Test* v =classPattern ; Ignore class pattern, ex [Tt]est[0-9] A =allClasses ; Include Protected and Private classes M =level ; Parse imports instead of Classes level 0=full import, 1=drop last file I =interfaces ; Include Interfaces in report i =classPattern ; Include class pattern, opposite of -v L =Title ; Set optional title

Examples (assumes java source code in directory src): llclasses -t +n src\*.java ; *.java prevent recursion llclasses -x src > llclasses.txt llclasses -h dir1 dir2 foo*.java > llclasses.html llclasses -h -I -T "-v=*Test*" src > javaTable.html llclasses -j src > llclassesWithJs.html llclasses -j -1=head.html -2=bodybegin.html -3=bodyend.html src > jtrees.html

-V is case sensitive llclasses -z -Z -O=.\viz\ -V=*Test* -V=*Exception* src > llclasses -z -N=10 -O=.\viz\ -V=*Test* -V=*Exception* src >

Example test script to generate reports using sample Java code

#!/bin/csh -f

#  Generate test reports

llclasses test       > reports/windows.txt
llclasses -h test    > reports/html.html
llclasses -h -T test > reports/tabular.html
llclasses -x test    > reports/text.txt
llclasses -t +n test > reports/list.txt
llclasses -j test    > reports/tree.html
llclasses -z test    > reports/

Sample reports

llclasses -h test > reports/html.html

File Path Scope Class AbstractCollection public abstract ┗ AbstractSet Interfaces:Set ArrayAdapter public abstract ┗ UnselectableArrayAdapter public abstract Calendar Interfaces:Cloneable, Serializable, Comparable public final Formatter Interfaces:Closeable, Flushable public Garage public LoaderReference.inner

llclasses -h -T test-dir/ > reports/tabular.html
Uses jquery table. Links to include jquery script are autogenerated.

llclasses -x test-dir/ > reports/text.txt

llclasses -t +n test-dir/ > reports/list.txt

llclasses -j test-dir/ > reports/tree.html
Needs dtree java script

llclasses -z test-dir/ > reports/
neato -Tpng reports/ > images/directgraph.png

Needs Graphviz to render dot as an image,
See sample graphs of Android class diagrams here