Skip to content

From JavaParser to jdraft

edefazio edited this page Mar 19, 2020 · 1 revision

Explain Yourself

Background

I have been meaning to write this for a long time, but, like most developers, I'm much more excited to write code than documentation or marketing materials. In addition, because the API is still in flux, and in general documentation rots (even more quickly than code) I didn't want to focus on presenting or selling "the idea", and then having to update all the code examples each time a change is made to the code...

Because, IMHO, "iteration is key", all of this stuff is experimental, About maybe <10% of the initial code that I wrote has survived the multiple refactorings and rewrites, so and I don't want to "lock things down" and share it too early (then regret I didn't do things differently after people use it or rely on it).

Ultimately I built this tool for ME to use, and I want it to be comfortable for me, as a tool that is comfortable (and even fun) to use, but I also want to make sure it occupies a useful space of "getting REAL things done based on REAL use cases", and not just some "academic" project that I would see in some research paper.

So with that out of the way, what I am going to attempt to show is "real code" with respect to when I am writing this Wiki entry... not only that but it should represent the "Spirit" of what I am endeavoring to do, and not

Why JDraft (and not JavaParser+ or something)?

because the main focus of the tool isn't "Parsing", it has more to do with "drafting" (building code within a program) or "inspecting" (traversing a Syntax tree and asking questions) and lets JavaParser handle the parsing. Basically it uses JavaParsers' data structures store the syntax, and provides tools for inspecting and manipulating JavaParser AST/CSTs.

What purpose does it serve? it is unabashedly a "tool" that one uses to make developers more productive, in this case productive building/handling/testing small to large codebases. It will let you write quick simple programs to automate generating or modifying code.

Clone this wiki locally