private int getIntValue ( int stackDepth , int defaultValue ) { if ( stack . getStackDepth ( ) < stackDepth ) { return defaultValue ; } OpcodeStack . Item it = stack . getStackItem ( stackDepth ) ; Object value = it . getConstant ( ) ; if ( ! ( value instanceof Integer ) ) { return defaultValue ; } return ( ( Number ) value ) . intValue ( ) ; }
return an int on the stack or defaultValue if can t determine