protected String [ ] buildArgs ( ) { String result [ ] = new String [ 0 ] ; List < String > args = new ArrayList < String > ( ) ; if ( lang != null && lang . length ( ) > 0 ) { args . add ( flagify ( CowsayCli . Opt . LANG . toString ( ) ) ) ; args . add ( lang ) ; } if ( html ) { args . add ( flagify ( CowsayCli . Opt . HTML . toString ( ) ) ) ; } if ( alt != null && alt . length ( ) > 0 ) { args . add ( flagify ( CowsayCli . Opt . ALT . toString ( ) ) ) ; args . add ( alt ) ; } if ( wrap != null ) { args . add ( flagify ( CowsayCli . Opt . WRAP_AT . toString ( ) ) ) ; args . add ( wrap ) ; } buildFaceArgs ( args ) ; args . add ( message ) ; return args . toArray ( result ) ; }
Build an args array that can be passed to cowsay .