R
R
reus2019-03-15 19:23:53
Java
reus, 2019-03-15 19:23:53

How to load only class description using file path without loading dependencies?

How to pull class definition CD (annotations of class, methods, fields) without loading dependencies and using only classPath?
I tried to pull it out using classLoader, but in my case there was a problem because I do not know the dependencies of this class.
If an error occurs to get a CD using ClassLoader, because dependency classes are not available, I
see two solutions:
1) ASM
2) There is access to sources, and you can just parse them (but I really don’t want to do this)
Maybe someone will suggest a good solution for getting meta information (name and annotations) of the class, fields and methods ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question