DEV Community

Adam Crockett ๐ŸŒ€
Adam Crockett ๐ŸŒ€

Posted on

How to melt your processor

Recently I have been building a software development lifecycle for Java RhinoJS, enhanced with Typescript backend.

We write JavaScript and get .ts feedback, its a nice middle-ground, I have never considered, I want the benefits of TS without the overhead of scaring others who don't know it (know your audience of developers).

In our product, we have some java classes injected into Rhino, and so I want type defs for when I write unit tests in our Mocha like Rhino framework.
I turn to code-generation, Node.js is actually used to run rhino, and build stuff, its looping through a bunch of .jar files, running jar tf TicTacToe.jar to get the contents, aka the com.path.to.Class structure in slash format

I do some string transforms to stdout and write all possilbe
java class path .class files to a ts file.

I got 380000 classes in a type myLib

:) fun

Top comments (2)

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha

380000 Classes... It feels at home to NPM project, But in Java. ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ

Collapse
 
adam_cyclones profile image
Adam Crockett ๐ŸŒ€

I made this library called "isNumber" ๐Ÿคฃ but seriously, this is enterprise scale so it's okay ๐Ÿ˜‘