public void clearCommandsWithExclude(final String... exclude) throws DevFailed {
        final String[] toExclude = new String[exclude.length];
        for (int i = 0; i < toExclude.length; i++) {
            toExclude[i] = exclude[i].toLowerCase(Locale.ENGLISH);
        }
        for (final String cmdName : dynamicCommands.keySet()) {
            if (!ArrayUtils.contains(toExclude, cmdName)) {
                removeCommand(cmdName);
            }
        }
    }
public void clearCommandsWithExclude ( final String ... exclude ) throws DevFailed { final String [ ] toExclude = new String [ exclude . length ] ; for ( int i = 0 ; i < toExclude . length ; i ++ ) { toExclude [ i ] = exclude [ i ] . toLowerCase ( Locale . ENGLISH ) ; } for ( final String cmdName : dynamicCommands . keySet ( ) ) { if ( ! ArrayUtils . contains ( toExclude , cmdName ) ) { removeCommand ( cmdName ) ; } } }
Remove all dynamic command with exceptions

@param exclude The commands that will not be removed
@throws DevFailed