Caleb Hearth
Caleb Hearth

Reputation: 3365

Where in the OpenJDK javac source should I start looking for a place to get java class metadata?

I am planning to start a project part of which requires a lexical analyzer for java source code. Simply, I need a class list with metadata. Inheritance hierarchy is enough for now, but eventually I'd like to be able to get more information on the class (such as containing class, and fields/methods with metadata).

I'd like to use OpenJDK to help with this.

Can anyone direct me where in the javac (or other) code I could best begin understanding how openjdk works so that I can fork the javac code and write something to get this information?

Upvotes: 0

Views: 254

Answers (1)

edwardw
edwardw

Reputation: 14002

There's Java Compiler api for that: overview and javadoc. The corresponding OpenJDK source code (for JDK 6) is here.

Upvotes: 1

Related Questions