public void pushDefaultReturnValueToStack ( Type type ) { if ( type . equals ( Type . BOOLEAN_TYPE ) ) { push ( false ) ; } else if ( type . equals ( Type . INT_TYPE ) || type . equals ( Type . SHORT_TYPE ) || type . equals ( Type . BYTE_TYPE ) || type . equals ( Type . CHAR_TYPE ) ) { push ( 0 ) ; } else if ( type . equals ( Type . LONG_TYPE ) ) { push ( 0L ) ; } else if ( type . equals ( Type . FLOAT_TYPE ) ) { push ( 0f ) ; } else if ( type . equals ( Type . DOUBLE_TYPE ) ) { push ( 0d ) ; } else if ( type . getSort ( ) == ARRAY || type . getSort ( ) == OBJECT ) { loadNull ( ) ; } }
Forces a return of a default value depending on the method s return type