[Soot-list] Is a given JimpleLocal a primitiveType?

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu May 26 14:46:12 EDT 2011


Hi Vasco.

This should work:
if(myLocal.getType() instanceof soot.PrimType) {
  //local has primitive type
}

Object references are generally of type RefLikeType
(http://www.sable.mcgill.ca/soot/doc/soot/RefLikeType.html). It's
called RefLikeType because this also comprises array references, etc.

Eric

On 26 May 2011 05:16, Vasco Pessanha <coreanu_ at hotmail.com> wrote:
> Hello,
>
> How can I know if a given local (or global) variable has a primitive type?
> I'm doing a dependency analysis, and that is important to know if a given
> variable has a copy of the value of another (what happens with primitive
> types) or a reference to it.
>
> Best Regards,
> Vasco
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


More information about the Soot-list mailing list