public static void negateBoolean ( MethodVisitor mv ) { // code to negate the primitive boolean Label endLabel = new Label ( ) ; Label falseLabel = new Label ( ) ; mv . visitJumpInsn ( IFNE , falseLabel ) ; mv . visitInsn ( ICONST_1 ) ; mv . visitJumpInsn ( GOTO , endLabel ) ; mv . visitLabel ( falseLabel ) ; mv . visitInsn ( ICONST_0 ) ; mv . visitLabel ( endLabel ) ; }
Negate a boolean on stack .