Compiler tree api: get fully qualified name

310 Views Asked by At

I am using Java Compiler Tree API for parsing java sources.

Currently i have run into the following issue. Consider I have a method which uses imported varible of type "Foo". The class Foo resembles in some package.

Is there any way to get a fully qualified name of this class?

I suppose

  • If it was imported, than its easy lookup
  • BUT, it might be in the same package (this should know the compiler?) and hence it is not imported
  • Or even it might be in some external library and linked using wildcard - than I cant lookup it.

Is there any solution to this problem?

Thanks.

0

There are 0 best solutions below