X Tutup
Skip to content

alantr7/java-class-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight .class parser

Allows you to easily read and parse a Java class, without actually loading it.

// Reads a Java class file at the specified path
ClassReader reader = new ClassReader(new FileInputStream(new File("PATH TO YOUR FILE")));
RawClass rawClass = reader.read();

// Wraps the raw class (loads names, signatures, descriptors, etc. for fields, methods, etc.)
ClassWrapper wrapper = ClassWrapper.newBuilder().build();

// Get class information
ClassInfo klass = wrapper.wrap(rawClass);

// Get all fields in the loaded class
Field[] fields = klass.getFields();

// Get all methods in the loaded class
Method[] methods = klass.getMethods();

For more details please check the wiki: https://github.com/alantr7/java-class-reader/wiki

About

Simple and very lightweight Java class parser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

X Tutup