[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Phantom classes and analysis



Hi Eric,

I am not sure the designing logic of only allowing phantom class created
in "loadClassAndSupport". All things happen in Scene.java between line 350
to 388. We can wait for other people's answer, but certainly you can work
around this problem temporarily by calling setPhantomRefs(true) in
getSootClass.

Cheers,
Feng
---------------------------------------------------------------------
Feng Qian                                       fqian@sable.mcgill.ca
Sable Research Group                       http://www.sable.mcgill.ca
School of Computer Science, McGill University        Montreal, Canada

On Wed, 22 Jan 2003, Eric Bodden wrote:

> Hi!
>
> I still have a question about phantom classes because I have experienced
> the following problem...
> I have some classes, which I want to analyze. For retrieving the line
> numbers of some methods, I invoke
>     JimpleBody body  = (JimpleBody) method.retrieveActiveBody();
> to get the body of the methods and then the line numbers of the single
> units. So far ok. But now I have the problem, that when I do not include
> the JRE into my classpath ("%javahome%\lib\rt.jar" to be precise), then
> Soot crashes with an exception telling me that java.lang.Cloneable could
> not be found. I mean: Of course it could not be found. But why is Soot
> actually trying to resolve that deeply? I thought java.lang.Cloneable
> would just be made a phantom class and then this would be ok. But it is
> _not_ resolved as phantom class and so cannot be found. Why?
>
> Thanks,
> Eric
>
> ------------------------------------------------------------
> Eric Bodden
> University of Kent at Canterbury
>
>