com.quorum.tessera.cli.parsers.Parser Maven / Gradle / Ivy
package com.quorum.tessera.cli.parsers;
import org.apache.commons.cli.CommandLine;
/**
* A parser that checks for CLI options and takes actions based upon them
*
* The actions may have side-effects, and may choose to return a value
*
* @param The return type from parsing the CLI options
*/
public interface Parser {
/**
* Parses the CLI arguments and performs actions based upon whether the
* arguments relevant to it are present or not
*
* @param commandLine the command line object that has parsed the configuration
* @return the output of the parser, if any
* @throws Exception if there is a problem with the supplied configuration,
* any exception could be thrown
*/
T parse(CommandLine commandLine) throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy