KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > neu > ccs > jmk > Operator


1 // $Id: Operator.java,v 1.1.1.1 2000/09/26 11:20:34 ramsdell Exp $
2

3 // The operator interface for commands.
4

5 /*
6  * Copyright 1997 by John D. Ramsdell
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22
23 package edu.neu.ccs.jmk;
24
25 /**
26  * The operator interface.
27  * Classes that implement this interface can be used as
28  * command operators.
29  * @see edu.neu.ccs.jmk.Command
30  * @version November 1997
31  * @author John D. Ramsdell
32  */

33 public interface Operator
34 {
35   /**
36    * Get the name of an operator.
37    * @return the name for printing
38    */

39   String JavaDoc getName();
40
41   /**
42    * Execute the operation specified by the operator.
43    * @param args parameters to the operation
44    * @param out place to write messages
45    * @exception CommandFailedException if operation failed
46    */

47   void exec(String JavaDoc[] args, java.io.PrintWriter JavaDoc out)
48        throws CommandFailedException;
49
50 }
51
Popular Tags