jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Margoline <marg...@gmail.com>
Subject from BCEL line back to source
Date Sun, 20 Dec 2009 01:24:25 GMT
Is there a good way to catch assignments to specific value in code?


public void testB() {
  *boolean o = !true;*
}

translates to

boolean a = !false;
  public testB() : void
   L0 (0)
    *LINENUMBER 32 L0
    ICONST_0
    ISTORE 1: o*
   L1 (3)
    LINENUMBER 33 L1
    RETURN
   L2 (5)
    LOCALVARIABLE this TestDoubleNegative L0 L2 0
    LOCALVARIABLE o boolean L1 L2 1
    MAXSTACK = 1
    MAXLOCALS = 2

I am particularly interested in getting from ICONST_0 to assignment of*!true
*. Let me know if anyone has an idea how to do this.
Thanks in Advance!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message