[Soot-list] Re: Java 1.5 source support
dprountz at cs.utexas.edu
Tue Oct 23 00:43:30 EDT 2007
On Mon, 22 Oct 2007, Eric Bodden wrote:
> On 22/10/2007, Dimitrios Prountzos <dprountz at cs.utexas.edu> wrote:
>> Thank you for your reply. Do you know if this is
>> effort is publicly available through some source code
> No, it's not yet.
>> Also, one more question. In the current implementation
>> of Soot, can someone retrieve the type of objects stored
>> in a java collection (which is stored as an attibute in the
>> constant pool), or does Soot need to be extended in order
>> to support this feature? (going through the list archives,
>> I saw an negative answer to this question some months ago).
> It's not stored at all as far as I know? Java uses type erasure... If
> indeed there is such an attribute it should be no big deal to read it
> out. But I never heard of such a thing.
What I had in mind was what is being described in paragraph 2.2 of the
technical report "Soot and Java 1.5".
You are right that due to type erasure the bytecode for a generic class
does not contain any type specific info. What i am interested in, is the
places of use of a specific collection, and there it seems that there
is some infomation describing what type was used in the source. By
manually inspecting the bytecode I can find a string referring to the
type. I will experiment with Soot and see if it is accessible from there
(although as you said there should be no real problem).
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
More information about the Soot-list