java-class-parser-generics
v0.0.2
Published
java-class-parser-generics
Downloads
1
Readme
Java Class Parser -Generics
A simple lib wrapped javap
to parse java .class files into json format. Only parse public members by default.
【fix Map】
Install
$ npm install java-class-parser-generics --save [-g]
Usage
In command line:
$ jjs-parser ./Model.class Service.class
In node:
var parser = require('java-class-parser-generics');
var clazzes = ['./Config.class'];
parser.parse(clazzes, function(err, rs) {
for (var clzName in rs) {
var clz = rs[clzName];
clz.constructors; // constructors, each constructor includes property scope, name, args
clz.fields; // an array of fields
clz.methods; // an array of methods;
clz.methods[0]; // method, includes property scope, ret, name, args
}
});
API
parser(clazzesPaths, [options], callback);
- clazzesPaths Array Paths of classes
- options Object current only =args= and =outputParser= is available
- callback function
Licence
MIT