[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I create a SootClass object from a byte code array?
Although I have not tried, the source code of
SootResolver.resolveClassAndSupportClasses should be a good example of
creating a SootClass from an InputStream:
74 /** Resolves the given className and all dependent classes. */
75 public SootClass resolveClassAndSupportClasses(String className)
76 {
>> creating your own SootClass object by name;
82 InputStream is = null;
>> make your own InputStream and ClassInputStream from your byte code
>> array;
105 soot.coffi.Util.resolveFromClassFile(sc, is, this, Scene.v());
>> call soot.coffi.Util.resolveFromClassFile
Cheers,
===========================================================
Feng Qian fqian@sable.mcgill.ca
On Thu, 23 May 2002, nathan gulley wrote:
> Hello,
>
> I am writing an application that needs to instrument
> multiple versions of the same class using Soot. Some
> of these classes are located on other machines. None
> of them are on the Soot classpath. I retrieve the byte
> code for each class I want to instrument using a
> variety of methods. However, it appears that Soot only
> allows the creation of a SootClass from the first
> class it encounters on its classpath.
>
> Is there any way to create a SootClass object from a
> byte code array?
>
> Thanks,
>
> nathan
> natebox@yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>