Is there a plugin or parser for Netbeans that can create a tree structure out of my Java source code(or otherwise let me easily extract things like class names, attributes and methods)?
Edit: I need the names for programming purposes, not just to get them. I need them to be returned to my program at runtime.
If I have this source code(for a game):
class Main {
    Terrain terrain;
    TradingSystem currentSystem;
    City city;
    public static void main(String[] args) {
    }
}
class Terrain {
}
class City {
    House tavern;
}
class TradingSystem {
    Bank cityBank;
    Trader npc1;
}
then I need a parser than can create something like this
   ----------Main-------------------
   |          |                    |
Terrain      City          --TradingSystem---
              |            |                |
            House         Bank            Trader
from my source code. I need a path from Main to the branches, like this Main->TradingSystem->Bank, or this Main->City->House.
I need to be able to extract the
- Class names
 - Method names
 - Attribute names
 
I need it for a Netbeans plugin I'm creating. Does this exist, free to use/download?
Edit: If there exist something for extracting the class names, attribute names and method names from one and one source file that is a good second option. I can write the additional logic from there.