[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What are phantom entities?
Something (usually a class, but can be a field or method) is phantom
when it doesn't exist, yet something else refers to it. In the case of a
class, this happens when you don't provide a given class file to Soot,
yet some other classes refer to it. In the case of a field, it means
that something refers to a field of a class, but the field does not
actually exist in that class.
Phantoms typically occur when there is a problem with the classpath.
For example, a referenced class may be missing from your classpath.
Or, a different version than you expect of a class may appear earlier
on the classpath than the version you expect, and this different version
has a different set of fields/methods.
The purpose of having phantoms in the first place is to allow Soot to at
least do *something* in the case when not all of the code is available.
However, no phantoms should be allowed unless you use the -allow-phantom-refs
switch.
Ondrej
On Fri, Jun 27, 2003 at 02:35:36AM -0500, Venkatesh Prasad Ranganath wrote:
> Hi,
>
> I am using Soot 2.0 and have come across Phantom Fields, Methods, and Classes. I can understand something that is native as
> being marked as phantom to indicate that there is not true Java counterpart of that entity. Native methods in this case.
> However, nativity by itself indicates this. If so, what extra information does "phatomness" provide? I am further more
> confused when a field such as threadInitNumber in java.lang.Thread is marked as phantom.
>
> Can somebody explain what does "phantom"ness mean in the context of a field, a method, and a class? How is it different from
> abstract/native? Where and how is it used? Also, is concrete just a coarser notion that encompases abstract, native, and
> phantom-ness in the context of methods?
>
> waiting for reply,
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad