private boolean isLongOption ( String token ) { if ( ! token . startsWith ( "-" ) || token . length ( ) == 1 ) { return false ; } int pos = token . indexOf ( "=" ) ; String t = pos == - 1 ? token : token . substring ( 0 , pos ) ; if ( ! options . getMatchingOptions ( t ) . isEmpty ( ) ) { // long or partial long options (--L, -L, --L=V, -L=V, --l, --l=V) return true ; } else if ( getLongPrefix ( token ) != null && ! token . startsWith ( "--" ) ) { // -LV return true ; } return false ; }
Tells if the token looks like a long option .