public static String shiftCommandLineParameters ( ) { String removed = null ; if ( commandLineParameters != null ) { if ( commandLineParameters . length == 0 ) { commandLineParameters = null ; } else if ( commandLineParameters . length == 1 ) { removed = commandLineParameters [ 0 ] ; commandLineParameters = null ; } else { removed = commandLineParameters [ 0 ] ; final String [ ] newTab = new String [ commandLineParameters . length - 1 ] ; System . arraycopy ( commandLineParameters , 1 , newTab , 0 , commandLineParameters . length - 1 ) ; commandLineParameters = newTab ; } } return removed ; }
Shift the command line parameters by one on the left . The first parameter is removed from the list .