1 /* 2 JavaProgramExecution.java 3 Creation date : 9/06/2010 4 Copyright © Benjamin Croizet (graffity2199@yahoo.fr) 5 6 This program is free software; you can redistribute it and/or 7 modify it under the terms of the GNU General Public License 8 or GNU Lesser General Public License as published by the 9 Free Software Foundation; either version 3 of the License, 10 or (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received copies of the GNU General Public License 18 and GNU Lesser General Public License along with this program; 19 if not, write to the Free Software Foundation, Inc., 20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 http://www.fsf.org/licensing/licenses/gpl.html 22 http://www.gnu.org/licenses/lgpl.html 23 */ 24 25 package net.sourceforge.plantumldependency.commoncli.program.execution; 26 27 import java.io.Serializable; 28 import java.util.Set; 29 30 import net.sourceforge.plantumldependency.common.clone.DeepCloneable; 31 import net.sourceforge.plantumldependency.commoncli.exception.CommandLineException; 32 import net.sourceforge.plantumldependency.commoncli.option.execution.OptionExecution; 33 34 /** 35 * The interface which describes a java program execution, which is an instance of a program, ready 36 * to be executed. 37 * 38 * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>) 39 * @since 1.3.0 40 * @version 1.3.0 41 */ 42 public interface JavaProgramExecution extends Comparable < JavaProgramExecution >, Serializable, 43 DeepCloneable < JavaProgramExecution > { 44 45 /** 46 * Executes the program. 47 * 48 * @throws CommandLineException 49 * if any exception occurs during the execution. 50 * @since 1.3.0 51 */ 52 void execute() throws CommandLineException; 53 54 /** 55 * Gets the list of all option executions. 56 * 57 * @return the {@link Set} of all {@link OptionExecution}. 58 * @since 1.3.0 59 */ 60 Set < OptionExecution > getOptionExecutions(); 61 }