Indddy
Extract identifiers from Java sources
Install / Use
/learn @lolo101/IndddyREADME
Indddy - the DDD indicator
Find out whether your codebase is Strongly Typed 💪 or Stringly Typed 🤦🏻
Why?
I believe that excellent code quality requires the developer to have a firm understanding of the business they implement.
A firm understanding of the business is reflected in the meaningful typing of the code.
Principle
The idea is to collect types used in the business logic code to compare it with the ubiquitous language.
With this insight, the developer can quantify how much the codebase correctly models the problem to solve.
The tool
indddy uses java-parser to build Concrete Syntax Tree from Java files, collects type identifiers that describe:
- fields
- variables
- parameters
- methods result
How to use
Standalone
In the project directory:
npm install to install required dependencies
node parse.js to parse stdin
As a dependency
That's how this package is intended to be used 😃
Suppose you have a Java project "my-java-project"
Just create this package.json file at the root of the project:
{
"name": "my-java-project",
"version": "0.0.1",
"devDependencies": {
"@lolo101/ddd-ast": "latest"
}
}
Run npm install
and then it becomes possible to use the ddd command in a script in your projects:
$ cat HelloWorldExample.java | npx ddd | sort | uniq -c | sort -nr
2 System
2 String
2 println
2 out
2 arguments
2 args
1 main
1 List
1 HelloWorldExample
1 asList
1 Arrays
How to maintain
How to release a new version
I recommend using np to publish a new release
npx np major
npx np minor
npx np patch
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
