public short shortValue ( String name ) { try { return Short . valueOf ( this . getArgumentByName ( name ) . Value ) ; } catch ( NullPointerException npe ) { printErrorAndQuit ( String . format ( "Argument '%s' was not provided." , name ) ) ; } catch ( Exception x ) { printErrorAndQuit ( String . format ( "Argument '%s' could not be cast to type: 'short'." , name ) ) ; } return - 1 ; // We will never get here: printErrorAndQuit will have terminated the application! }
Retrieves the value of an argument as a short .