java - How to get fully qualified class name from IResource object? -
i have iresource
object of java class. need qualified class name object.
my iresource.getfullpath().tostring()
gives me /myproject/src/abc/def/myclass.java
. want abc.def.myclass
it.
how can qualified class name?
not sure if want qualified class name or qualified location in file system. i'll mention both:
class name:
((itype) javacore.create(ifile)).getfullyqualifiedname()
also, make sure check nulls , instanceof.
resource location:
ifile.getlocation()
Comments
Post a Comment