Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codecop/javaclass-rb
Java Class File Parser for Ruby
https://github.com/codecop/javaclass-rb
classfile-parser gem java ruby
Last synced: about 2 months ago
JSON representation
Java Class File Parser for Ruby
- Host: GitHub
- URL: https://github.com/codecop/javaclass-rb
- Owner: codecop
- License: other
- Created: 2020-02-03T18:40:41.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-04T18:51:40.000Z (about 4 years ago)
- Last Synced: 2024-04-26T05:44:18.061Z (8 months ago)
- Topics: classfile-parser, gem, java, ruby
- Language: Ruby
- Homepage: https://www.code-cop.org/api/javaclass-rb/
- Size: 954 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: history.txt
- License: license.txt
Awesome Lists containing this project
README
# Java Class File Parser for Ruby
## Description
javaclass-rb (Java Class File Parser for Ruby) is a
parser and disassembler for Java class files, similar to the javap command.
It provides access to the package, protected, and public fields and methods
of the classes passed to it together with a list of all outgoing references.## Motivation
I am still doing Java most of the time. I used to be quite enthusiastic about
it, but after 11 years I can see the advantages of being a polyglot. So I use
Ruby for all kind of stuff, just for fun. When I needed some Java class
analysis I wrote it in Ruby. As I am a puritan, I did not
want to call `javap` from my script, so I started disassembling the class files,
which might be the base for some serious static code analysis tools. (I
started adding methods to that end...)## Goals
* searching and accessing class files
* parsing meta data of class files
* displaying this meta data
* analysing the structure of class files (down to field/method level)
* calculating numbers based on this structure
* calculating higher metrics
* "static code analysis"## Non Goals
* parsing the actual byte code
* verifying byte code
* generating byte code
* generating class files
* executing byte code## Documentation
Module `JavaClass` is the entry point for basic functions. All advanced functions are
available in Object through the `JavaClass::Dsl::Mixin`. The main class or the parser
is `JavaClass::ClassFile::JavaClassHeader` which provides access to all information
of a Java class file.
Read the [API RDoc](https://www.code-cop.org/api/javaclass-rb/).### License
[The 2-Clause BSD License](http://opensource.org/licenses/bsd-license.php), see `license.txt` in repository.