How does java access the abstract syntax tree AST,SimpleType to the corresponding class?

class FtVisitor extends ASTVisitor {     
        @Override
        public boolean visit(SimpleType node) {
            String dictString[] = {"0", node.getName().toString()};
            mBodyClass.add(dictString);
            return true;
        }
    }

inherits ASTVisitor. I want to get all the classes of the source file, so how do I change the node of this class SimpleType node to a concrete class? Because I want to get the pathname of the class through this class:
String packageName = A.class.getPackage (). GetName ();

Menu