[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Boolean Constants
Patrick LAM wrote:
> > How would I create a boolean constant? I know I can use
> > jimple.IntConstant, but I need the type to BooleanType.
>
> I can't see any way to manufacture a constant with type BooleanType. You
> could modify Jimple and create a jimple.BooleanConstant class which would
> have the appropriate type, if you really need that. It seems that inside
> Jimple, booleans do tend to get IntConstant values, e.g.
>
> boolean z0;
> z0 = 1;
This makes some sense.. in classfiles boolean, byte, char, and short
constants are represented with 32 bit int's.
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com