private String [ ] expandAtFiles ( String args [ ] ) throws CmdLineException { List < String > result = new ArrayList < String > ( ) ; for ( String arg : args ) { if ( arg . startsWith ( "@" ) ) { File file = new File ( arg . substring ( 1 ) ) ; if ( ! file . exists ( ) ) throw new CmdLineException ( this , Messages . NO_SUCH_FILE , file . getPath ( ) ) ; try { result . addAll ( readAllLines ( file ) ) ; } catch ( IOException ex ) { throw new CmdLineException ( this , "Failed to parse " + file , ex ) ; } } else { result . add ( arg ) ; } } return result . toArray ( new String [ result . size ( ) ] ) ; }
Expands every entry prefixed with the AT sign by reading the file . The AT sign is used to reference another file that contains command line options separated by line breaks .