Giter VIP home page Giter VIP logo

ljv's Introduction

The Lightweight Java Visualizer (LJV)

Actions Status: build Maven Central

LJV a is tool for visualizing Java data structures, using Graphviz.

It was developed by John Hamer in 2004 and released under GNU GPL (see the original project page).

This project aims to upgrade this tool to modern Java and make it an open source library in the modern sense of the word.

See documentation and JavaDoc.

How to use

The tool requires Java 11 or later version. Pull in the LJV dependency:

<dependency>
  <groupId>org.atp-fivt</groupId>
  <artifactId>ljv</artifactId>
  <version>1.04</version>
</dependency>

Execute the following (obj can be any object that you wish to visualize):

public class Main {
    public static void main(String[] args) {
        browse(new LJV(), Map.of(1, 'a', 2, 'b'));
    }

    public static void browse(LJV ljv, Object obj) {
        try {
            var dot = URLEncoder.encode(ljv.drawGraph(obj), "UTF8")
                        .replaceAll("\\+", "%20");
            Desktop.getDesktop().browse(
                new URI("https://dreampuf.github.io/GraphvizOnline/#" 
                        + dot));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }
}

A browser window will appear with a diagram that will look like this:

Immutable MapN internal structure visualization

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.