From: Cato P. <ca...@if...> - 2008-07-11 19:35:31
|
Aha. Thank you kindly sir. :-) Best regards, Cato Peter C. Mehlitz wrote: > we don't do any modeling of java.util collections, i.e. use the plain > library classes, so you have to use 'javap -p' to get the field names. > There is nothing special about setting their field values, which is > done with PUTFIELD insns from the library code. > > Apart from being a bit tedious, the problem with your approach is that > you only have an interface (java.util.List), whereas you need a > concrete implementor to know about the field names. From an MJI > perspective, it's much easier to deal with simple arrays, at least > until we have an MJI utility that allows us to iterate over JPF-object > collections. > > -- Peter > > > > On Jul 11, 2008, at 11:41 AM, Cato Pakusch wrote: > > >> Hey guys >> >> I need to use MJI to traverse a couple collections. Basically, my >> model class declares the method with this: >> >> >> static native void PrintList(List<Integer> l); >> >> >> and I'll implement it in a native peer class. In my native peer >> class, I'll get access to the elements / objects of the collection >> by using methods such as getReferenceField and getIntField. >> >> Now to the problem. Getting these fields, require a call made with a >> couple arguments as int and String, where the String is the field >> name of the value that I'm getting. So I need to know how JPF sets >> all the field names for its collections, in order to get out the >> correct fields. I've been searching up and down in the source code >> to find the code that sets the fields, but I cannot find it. Any >> pointers please? >> >> Best regards, >> Cato >> > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Javapathfinder-devel mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/javapathfinder-devel > > |