@Override
    public void sawOpcode(int seen) {
        boolean sawSBToString = false;
        try {

            stack.precomputation(this);
            if ((seen >= Const.IRETURN) && (seen <= Const.ARETURN)) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);

                    Integer register = Integer.valueOf(item.getRegisterNumber());
                    Object constant = registerConstants.get(register);
                    if (CONSTANT_DOESNT_EXIST.equals(constant)) {
                        throw new StopOpcodeParsingException();
                    }

                    String returnSig = item.getSignature();
                    if ((returnSig != null) && returnSig.startsWith(Values.SIG_ARRAY_PREFIX)) {
                        XField f = item.getXField();
                        if ((f == null) || (!f.isStatic())) {
                            throw new StopOpcodeParsingException();
                        }
                    }

                    constant = item.getConstant();
                    if (constant == null) {
                        throw new StopOpcodeParsingException();
                    }
                    if (Boolean.TRUE.equals(item.getUserValue()) && ("".equals(constant))) {
                        throw new StopOpcodeParsingException();
                    }
                    if ((returnConstant != null) && (!returnConstant.equals(constant))) {
                        throw new StopOpcodeParsingException();
                    }

                    returnRegister = Integer.valueOf(item.getRegisterNumber());
                    returnConstant = constant;
                    returnPC = getPC();
                }
            } else if ((seen == Const.GOTO) || (seen == Const.GOTO_W)) {
                if (stack.getStackDepth() > 0) {
                    // Ternaries confuse us too much, if the code has a ternary well - oh well
                    throw new StopOpcodeParsingException();
                }
            } else if (seen == Const.ATHROW) {
                throw new StopOpcodeParsingException();
            } else if (seen == Const.INVOKEVIRTUAL) {
                String clsName = getClassConstantOperand();
                if (SignatureUtils.isPlainStringConvertableClass(clsName)) {
                    sawSBToString = Values.TOSTRING.equals(getNameConstantOperand());
                }
            } else if (((seen >= Const.ISTORE) && (seen <= Const.ASTORE_3)) || (seen == Const.IINC)) {
                Integer register = Integer.valueOf(getRegisterOperand());
                if ((returnRegister.intValue() != -1) && (register.equals(returnRegister))) {
                    throw new StopOpcodeParsingException();
                }

                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    Object constant = item.getConstant();

                    Object regConstant = registerConstants.get(register);
                    if (regConstant != null) {
                        if ((constant == null) || !constant.equals(regConstant)) {
                            registerConstants.put(register, CONSTANT_DOESNT_EXIST);
                        }
                    } else {
                        if (item.getSignature().contains(Values.SIG_ARRAY_PREFIX)) {
                            registerConstants.put(register, CONSTANT_DOESNT_EXIST);
                        } else {
                            registerConstants.put(register, constant == null ? CONSTANT_DOESNT_EXIST : constant);
                        }
                    }
                } else {
                    registerConstants.put(register, CONSTANT_DOESNT_EXIST);
                }

                if (returnRegister.equals(register)) {
                    Object constant = registerConstants.get(returnRegister);
                    if (CONSTANT_DOESNT_EXIST.equals(constant)) {
                        throw new StopOpcodeParsingException();
                    }
                }
            }

        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (sawSBToString && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Boolean.TRUE);
            }
        }
    }
@ Override public void sawOpcode ( int seen ) { boolean sawSBToString = false ; try { stack . precomputation ( this ) ; if ( ( seen >= Const . IRETURN ) && ( seen <= Const . ARETURN ) ) { if ( stack . getStackDepth ( ) > 0 ) { OpcodeStack . Item item = stack . getStackItem ( 0 ) ; Integer register = Integer . valueOf ( item . getRegisterNumber ( ) ) ; Object constant = registerConstants . get ( register ) ; if ( CONSTANT_DOESNT_EXIST . equals ( constant ) ) { throw new StopOpcodeParsingException ( ) ; } String returnSig = item . getSignature ( ) ; if ( ( returnSig != null ) && returnSig . startsWith ( Values . SIG_ARRAY_PREFIX ) ) { XField f = item . getXField ( ) ; if ( ( f == null ) || ( ! f . isStatic ( ) ) ) { throw new StopOpcodeParsingException ( ) ; } } constant = item . getConstant ( ) ; if ( constant == null ) { throw new StopOpcodeParsingException ( ) ; } if ( Boolean . TRUE . equals ( item . getUserValue ( ) ) && ( "" . equals ( constant ) ) ) { throw new StopOpcodeParsingException ( ) ; } if ( ( returnConstant != null ) && ( ! returnConstant . equals ( constant ) ) ) { throw new StopOpcodeParsingException ( ) ; } returnRegister = Integer . valueOf ( item . getRegisterNumber ( ) ) ; returnConstant = constant ; returnPC = getPC ( ) ; } } else if ( ( seen == Const . GOTO ) || ( seen == Const . GOTO_W ) ) { if ( stack . getStackDepth ( ) > 0 ) { throw new StopOpcodeParsingException ( ) ; } } else if ( seen == Const . ATHROW ) { throw new StopOpcodeParsingException ( ) ; } else if ( seen == Const . INVOKEVIRTUAL ) { String clsName = getClassConstantOperand ( ) ; if ( SignatureUtils . isPlainStringConvertableClass ( clsName ) ) { sawSBToString = Values . TOSTRING . equals ( getNameConstantOperand ( ) ) ; } } else if ( ( ( seen >= Const . ISTORE ) && ( seen <= Const . ASTORE_3 ) ) || ( seen == Const . IINC ) ) { Integer register = Integer . valueOf ( getRegisterOperand ( ) ) ; if ( ( returnRegister . intValue ( ) != - 1 ) && ( register . equals ( returnRegister ) ) ) { throw new StopOpcodeParsingException ( ) ; } if ( stack . getStackDepth ( ) > 0 ) { OpcodeStack . Item item = stack . getStackItem ( 0 ) ; Object constant = item . getConstant ( ) ; Object regConstant = registerConstants . get ( register ) ; if ( regConstant != null ) { if ( ( constant == null ) || ! constant . equals ( regConstant ) ) { registerConstants . put ( register , CONSTANT_DOESNT_EXIST ) ; } } else { if ( item . getSignature ( ) . contains ( Values . SIG_ARRAY_PREFIX ) ) { registerConstants . put ( register , CONSTANT_DOESNT_EXIST ) ; } else { registerConstants . put ( register , constant == null ? CONSTANT_DOESNT_EXIST : constant ) ; } } } else { registerConstants . put ( register , CONSTANT_DOESNT_EXIST ) ; } if ( returnRegister . equals ( register ) ) { Object constant = registerConstants . get ( returnRegister ) ; if ( CONSTANT_DOESNT_EXIST . equals ( constant ) ) { throw new StopOpcodeParsingException ( ) ; } } } } finally { TernaryPatcher . pre ( stack , seen ) ; stack . sawOpcode ( this , seen ) ; TernaryPatcher . post ( stack , seen ) ; if ( sawSBToString && ( stack . getStackDepth ( ) > 0 ) ) { OpcodeStack . Item item = stack . getStackItem ( 0 ) ; item . setUserValue ( Boolean . TRUE ) ; } } }
implements the visitor to look for methods that return a constant

@param seen
the opcode of the currently parsed instruction