private static ParsedLine extractCommandArguments ( final ParsedLine line ) { // copy the list, so we can mutate and pop the first item off LinkedList < String > words = Lists . newLinkedList ( line . words ( ) ) ; String remove = words . pop ( ) ; String rawLine = line . line ( ) ; // rebuild that list sans the first argument if ( remove . length ( ) > rawLine . length ( ) ) { return new DefaultParser . ArgumentList ( rawLine . substring ( remove . length ( ) + 1 , rawLine . length ( ) ) , words , line . wordIndex ( ) - 1 , line . wordCursor ( ) , line . cursor ( ) - remove . length ( ) + 1 ) ; } else { return new DefaultParser . ArgumentList ( "" , Collections . emptyList ( ) , 0 , 0 , 0 ) ; } }
Extract the command specific portions of the given line .