KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > ccm > scripts > OptionsManager


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2005 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library 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 GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle, Mathieu Vadet.
23 Contributor(s): .
24
25 ====================================================================
26 $Id: OptionsManager.java,v 1.1 2005/06/17 15:58:27 merle Exp $
27 ====================================================================*/

28
29 package org.objectweb.ccm.scripts;
30
31 /**
32  * A options manager interface.
33  *
34  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
35  * <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
36  *
37  * @version 0.3
38  */

39
40 public interface OptionsManager
41 {
42     /**
43      ** Add the option opt in the possible options list.
44      **/

45     public void
46     addOption(Option opt);
47
48     /**
49      ** Check if the option opt is set to true.
50      **/

51     public boolean
52     isSet(String JavaDoc opt);
53
54     /**
55      ** Return the values associated with the option opt.
56      **/

57     public String JavaDoc[]
58     get(String JavaDoc opt);
59
60     /**
61      ** Return all the options that are not recognized and their possible values.
62      ** We intend it to be used for returning the options that will be passed to another compiler.
63      **/

64     public String JavaDoc
65     getOthers();
66
67     /**
68      ** Analyse a command line.
69      ** Return -1 if an error occurs.
70      **/

71     public int
72     analyse(String JavaDoc[] commandline);
73
74     /**
75      ** Display the usage.
76      **/

77     public void
78     usage();
79 }
80
Popular Tags